Tooltip
The Tooltip component is a compact, accessible way to provide additional context or brief information on hover or focus. Perfect for clarifying buttons, icons, or other UI elements, Tooltips enhance usability by offering extra detail without cluttering the interface.
This is a tooltip!
Structure
API Reference
x-data="tooltip"
The root component containing the state and functionality.
Property | Type | Description | Default |
---|---|---|---|
open | boolean | The open state of the tooltip | false |
openDelay | number | Delay in milliseconds before showing the tooltip on hover | 500 |
closeDelay | number | Delay in milliseconds before hiding the tooltip | 0 |
placement | enum "top" | "right" | "bottom" | "left" | Preferred placement of the tooltip relative to the trigger element | top |
offset | number | Distance in pixels between tooltip and trigger | 10 |
flip | boolean | Wether the tooltip should flip when not enough space is available | true |
shift | object | Shifts tooltip position for view optimization | {
"padding": 10
} |
arrow | boolean | Display an arrow pointing to the trigger. Needs an element with x-ref="arrow" inside the content element.` | true |
onOpenChange | function | Callback when tooltip open state changes | null |