Popover

Overlay

An accessible popup anchored to a button. A high-quality, unstyled React popover component that displays content in a floating panel.

Installation

bash
1npx @dinachi/cli@latest add popover

Run the CLI command above to automatically install the component and its dependencies.

Examples

Default Popover

A basic popover with title and description

Popover with Close Button

A popover with a close button and interactive content

Popover Positions

Popovers can be positioned on different sides

Hover Popover

A popover that opens on hover

API Reference

PropTypeDefaultDescription
defaultOpen
booleanfalseWhether the popover is initially open
open
booleanControlled open state
onOpenChange
(open: boolean) => voidCallback when open state changes
modal
boolean | 'trap-focus'falseWhether to enter modal mode
openOnHover
booleanfalseOpen popover on hover
delay
number300Hover delay in milliseconds
closeDelay
number0Close delay in milliseconds
side
'top' | 'bottom' | 'left' | 'right''bottom'Preferred side
align
'start' | 'center' | 'end''center'Alignment relative to trigger
sideOffset
number8Distance from trigger in pixels