Skip to content

Popover

SPopover is a floating panel anchored to a trigger: it suits action menus, popover forms and interactive hints. It is built on Reka UI (portal, positioning, closing on Esc/outside click, focus management). The trigger goes into the #trigger slot (as-child), the content into the default slot.

Basic usage

Side and alignment

The modal prop blocks interaction with the background and enables a focus trap: while the panel is open, focus cannot leave it and the background is dimmed.

Elevation

The popover panel is raised to the third elevation level. flat removes the shadow, elevation sets a custom level; the radius is not affected — square controls it, see Elevation.

API

Props

NameTypeDefaultDescription
squarebooleanundefinedSquare corners: removes the rounding (rounded by default).
side | "right" | "left" | "top" | "bottom""bottom"Side of the trigger the panel appears on.
align"start" | "center" | "end""center"Alignment along the chosen side.
side-offsetnumber8Offset from the trigger in pixels.
modalbooleanfalseModal mode: blocks interaction with the background and enables a focus trap.
aria-labelstringundefinedAccessible name of the popover panel (aria-label).
flatbooleanundefinedRemoves the shadow. Overridden by the elevation prop when it is set.
elevation0 | 1 | 2 | 3 | 4 | 5undefinedShadow level 0–5 (scale); 0 means no shadow. Overrides flat.
openbooleanfalseWhether the panel is open. Two-way binding via v-model:open.

Events

NameSignatureDescription
update:open(value: boolean) => voidEmitted when open changes. Used for two-way binding (v-model:open).

Slots

NameDescription
triggerTrigger element that opens the panel on click.
defaultPopover panel content.