Primitives
Popover
A panel anchored to a trigger, for content you work in: a calendar, a filter, a list of notifications. A Tooltip only shows text and a Dropdown is a menu of actions. It stands on the same surface as the rest of the overlay family. Focus moves in on open and back to the trigger on Esc.
Preview
Installation
// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| open / onOpenChange | boolean / (open: boolean) => void | - | Controlled state. Leave both out and it manages itself |
| side | "top" | "right" | "bottom" | "left" | "bottom" | Where it opens. It flips when there is no room (PopoverContent) |
| align | "start" | "center" | "end" | "start" | Alignment against the trigger (PopoverContent) |
| modal | boolean | false | Traps focus and blocks the page behind it |