A Vue component that creates a customizable popover with various trigger modes and placement options.
| Prop | Type | Default | Description |
|---|---|---|---|
mode | String | 'hover' | Trigger mode for the popover. Can be 'click' or 'hover'. |
open | Boolean | undefined | Controls the open state of the popover. |
disabled | Boolean | false | Disables the popover when true. |
openDelay | Number | 0 | Delay in milliseconds before opening the popover (for hover mode). |
closeDelay | Number | 0 | Delay in milliseconds before closing the popover (for hover mode). |
transitionName | String | 'popover' | Name of the transition effect for the popover. |
placement | String | 'bottom' | Placement of the popover. Can be 'top', 'bottom', 'left', or 'right'. |
arrow | Boolean | true | Shows an arrow on the popover when true. |
arrowClass | String | 'bg-gray-500' | CSS class for styling the arrow. |
offset | Number | 8 | Offset distance of the popover from the trigger element. |
| Slot | Description |
|---|---|
trigger | Content for the trigger element. Provides `open` and `close` properties. |
default | Content for the popover panel. Provides `open` and `close` properties. |
| Event | Description |
|---|---|
update:open | Emitted when the open state of the popover changes. |
You can customize the Popover component in several ways:
mode prop to choose between hover and click triggers.placement prop to change the popover's position relative to the trigger.openDelay and closeDelay props to control timing for hover mode.transitionName prop to apply custom transition effects.arrowClass prop.offset prop.