Popover

Floating content anchored to a trigger element. Non-modal by default — clicks outside dismiss it. Use for inline forms, info, or quick actions.

Inline form

Info card

Right-anchored

Installation

pnpm
pnpm dlx @hex-core/cli add popover

API Reference

PropTypeDefaultDescription
open
booleanControlled open state
defaultOpen
booleanfalseDefault open state
onOpenChange
functionCallback on open state change: (open: boolean) => void
modal
booleanfalseWhen true, content outside the popover is inert

AI Guidance

When to use

Use for inline forms, quick settings, info panels, or color pickers. Anchored to a trigger, non-modal, dismisses on outside click.

When not to use

Don't use for critical tasks that interrupt (use Dialog). Don't use for hover-only info (use Tooltip or HoverCard). Don't use for menu actions (use DropdownMenu).

Common mistakes

  • Using Popover when the user must address the content (should be Dialog)
  • Missing asChild on PopoverTrigger when using a styled Button
  • Popover content too wide — keep it focused and compact

Accessibility

Radix manages focus, aria-expanded on the trigger, and closes on Escape. Content is portalled to body so stacking contexts don't clip it.

Token budget: 400