Popover
The Popover component provides a lightweight, accessible way to display contextual information or additional options. It’s perfect for showing interactive content that appears in relation to a specific element on the page.
Edit dimensions
Structure
API Reference
x-data="popover"
The root component containing the state and functionality.
Property | Type | Description | Default |
---|---|---|---|
open | boolean | The open state of the popover | false |
placement | enum "top" | "right" | "bottom" | "left" | Preferred placement of the popover relative to the trigger element | bottom |
offset | number | Distance in pixels between popover and trigger | 10 |
flip | boolean | Wether the popover should flip when not enough space is available | true |
shift | object | Shifts popover 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 popover open state changes | null |