Toggle Sidebar B
AppearanceLight & dark mode D

Popover

Displays rich content in a portal, triggered by a button.

Demo

Replay preview

Basic

A simple popover with a header, title, and description.

Replay preview

Align

Use the align prop on PopoverContent to control the horizontal alignment.

Replay preview

With Form

A popover with form fields inside.

Replay preview

API Reference

Popover

PropTypeDefaultDescription
openbooleanOpen state. Supports v-model:open.
defaultOpenbooleanfalseOpen state when initially rendered. Use when the popover is uncontrolled.
modalbooleanfalseTrap focus and dim background.
EventDescription
update:openFires when the popover opens or closes. Enables v-model:open.

PopoverTrigger

PropTypeDefaultDescription
asChildbooleanfalseMerge props onto the child element instead of a button.

PopoverAnchor

PropTypeDefaultDescription
asChildbooleanfalseMerge props onto the child element. Positions the content against this element instead of the trigger.

PopoverContent

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""bottom"Anchor side.
align"start" | "center" | "end""center"Alignment along the side.
sideOffsetnumber4Gap from the trigger.

PopoverHeader

PropTypeDefaultDescription
classstringExtra classes, merged with cn(). Wraps the title and description.

PopoverTitle

PropTypeDefaultDescription
classstringExtra classes, merged with cn(). Renders an h4.

PopoverDescription

PropTypeDefaultDescription
classstringExtra classes, merged with cn(). Renders a muted paragraph.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
SpaceWhen focus is on the trigger, toggles the popover open or closed.
EnterWhen focus is on the trigger, toggles the popover open or closed.
TabMoves through focusable elements inside the content, then out of the popover.
Shift + TabMoves focus to the previous focusable element.
EscCloses the popover and returns focus to the trigger.
  • Focus moves into the content when the popover opens.
  • The trigger exposes aria-expanded and aria-controls linking it to the content.