Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Popover

A small anchored surface for secondary content and actions. It stays attached to its trigger and does not take over the page.

Preview
Anchored to the trigger, never a modal.
<Popover>
  <PopoverTrigger render={<Button variant="tertiary">Find a reference</Button>} />
  <PopoverContent side="bottom" align="start">
    <PopoverTitle>Find a reference</PopoverTitle>
    <PopoverDescription>Enter the number on your receipt.</PopoverDescription>
  </PopoverContent>
</Popover>

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 (default false, also accepts trap-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.

← PreviousDialogNext →Progress

Install

npx shadcn@latest add @pilipinas/popover

For your coding agent