Popover
Displays rich content in a portal, triggered by a button.
Demo
Usage
Import the parts you need from the component's folder.
ts
import {
Popover,
PopoverContent,
PopoverDescription,
PopoverHeader,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover";Basic
A simple popover with a header, title, and description.
Align
Use the align prop on PopoverContent to control the horizontal alignment.
With Form
A popover with form fields inside.
API Reference
Popover
PopoverTrigger
PopoverAnchor
PopoverContent
PopoverHeader
PopoverTitle
PopoverDescription
Accessibility
Keyboard shortcuts and ARIA behavior.
- Focus moves into the content when the popover opens.
- The trigger exposes aria-expanded and aria-controls linking it to the content.