Tooltip
Live Demos HubTooltip
Interactive production-grade hypermedia component for HTMXUI.
Interactive Preview
{trigger}
HTML Source
<!--
Component: tooltip.html
Configurable State: themeColor ('primary'|'secondary'|'destructive'), size ('sm'|'md'|'lg'), isOpen (boolean)
Usage: Bind styles dynamically using hx-class="{ 'bg-primary': themeColor === 'primary' }" or hx-style="{ width: size === 'lg' ? '100%' : 'auto' }"
-->
<div hx-ext="reactive" hx-state="{ themeColor: \'primary\', size: \'md\', isOpen: false }" class="group relative inline-block">
{trigger}
<div class="absolute -top-2 left-1/2 -translate-x-1/2 -translate-y-full z-50 hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground group-hover:block animate-in fade-in-0 zoom-in-95">
{content}
<div class="absolute -bottom-1 left-1/2 -translate-x-1/2 border-4 border-transparent border-t-primary"></div>
</div>
</div>