Popover
A floating panel anchored to a trigger.
Staticimport { Popover } from 'umbra-ui'
Props
Popover
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | `PopoverTrigger` and `PopoverContent`. |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
modal | boolean | false | Trap focus and block outside interaction while open. |
onOpenChange | ((open: boolean) => void) | — | Called when the popover opens or closes. |
open | boolean | — | Controlled open state. |
PopoverContent
| Prop | Type | Default | Description |
|---|---|---|---|
arrow | boolean | false | Shows a small arrow pointing at the trigger. |
Usage notes
For secondary content and small forms. Use Tooltip for text-only hints.
Accessibility
- Focus moves into the panel on open and back to the trigger on close; Escape closes.
- The trigger exposes
aria-expandedandaria-controls. - Give the content an
aria-labelwhen it has no heading.
Import
import { Popover, PopoverContent } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app