Popover
A click-triggered, non-modal floating panel anchored to its trigger. Focus moves in on open but is never trapped; Escape and outside clicks close it.
Installation
npx dafink-ui add popoverDemo
Props
| Name | Type | Default | Description |
|---|---|---|---|
| trigger | ReactNode | - | Content of the built-in trigger button. |
| children | ReactNode | - | Panel content. May contain interactive elements. |
| side | 'top' | 'right' | 'bottom' | 'left' | 'bottom' | Which side of the trigger the panel appears on. |
| align | 'start' | 'center' | 'end' | 'center' | Alignment along the chosen side. |
| label | string | undefined | Accessible name for the panel (aria-label). |
| onOpenChange | (open: boolean) => void | undefined | Called whenever the popover opens or closes. |
| disabled | boolean | false | Disables the trigger. |
| className | string | '' | Additional classes on the panel. |
| triggerClassName | string | '' | Additional classes on the trigger button. |