Components
Popover
A small anchored surface for secondary content and actions. It stays attached to its trigger and does not take over the page.
Usage
Compact contextual content anchored to one control.
Do and don't
- Do. Give it a title and keep the content short.
- Don't. Nest popovers or use one for validation text that must stay visible.
Composition
Popover owns the open state. PopoverTrigger and PopoverClose accept render or asChild so a Button can be the control. PopoverContent holds PopoverTitle, PopoverDescription and whatever controls the task needs.
Props
Popover:open,defaultOpen,onOpenChange,modal(defaultfalse, also acceptstrap-focus).PopoverContent:side,align,sideOffset, plus standard div attributes.PopoverTrigger/PopoverClose:render,asChild.
Behavior and states
Base UI positions the panel against the trigger, flips it on collision and closes it on outside press or Escape. The panel enters and exits from the resolved side using the shared popup choreography. The surface level is read from its substrate, so a popover opened inside a dialog lands one step above it instead of melting into it.
Accessibility
Give the panel a PopoverTitle so it has a name. Keep focus management with the primitive: a non-modal popover leaves the rest of the page interactive, while modal="trap-focus" holds focus when the task requires it. Do not use a popover for validation text that must stay visible; use FieldError.
Responsive
The panel is 288px wide by default and follows the shared size step through its contents. On narrow screens the positioner flips side and alignment to keep the panel in view; keep the content short enough to fit without an inner scroll.
Related
Layout & Spacing covers the surface ladder, Motion & Transitions the popup timing, and Select is the dedicated control when the panel only lists choices.