Popover
- Project updatesNotification summaries are on.
- Display densityComfortable rows
A button that opens a small panel of interactive content beside it; className, style, other attributes and the ref go to the trigger.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For a small panel of controls beside a button: display preferences, a quick filter.
A decision that blocks the page, or an action that can’t be undone? Dialog. A list of actions? Menu.
Opens from a button with aria-expanded. Tab moves through the panel’s content, and closing returns focus to the button.
import { Popover } from '@idyeah/diya'Stable since 1.0.0
childrenRequiredReactNode | ((close: () => void) => ReactNode)The panel's content, or a function that renders it; call close to shut it and return focus to the trigger.
labelRequiredstringThe trigger button's visible text and the panel's accessible name; with trigger, only the panel's name.
disabledbooleanDisables the trigger and closes an open panel.
Default false
onOpenChange(open: boolean) => voidCalled with the next open state whenever the panel opens or closes.
openbooleanWhether the panel is open; leave it out to let the trigger manage it.
placement"top" | "bottom"Preferred side for the panel; it moves to stay on screen. Defaults to 'bottom'.
Default 'bottom'
triggerReactElement<any, string | React.JSXElementConstructor<any>>Your own trigger element, such as <Button iconOnly aria-label="More">…</Button>; DIYA wires its click, keys and ARIA. Defaults to a DIYA Button showing label.
Also takes every native <button> attribute, such as name, id or data-*.