Skip to content

Overlays

IPopover

A panel anchored to whatever opened it, for content too big for a tooltip and too small for a dialog. Unlike ITooltip it takes focus and can hold interactive content; unlike IDialog it leaves the page usable behind it.

Holding a form

Set modal when the panel contains something to fill in: focus is trapped and the page behind goes inert. The default slot receives a close function.

Placement

side and align position the panel against its trigger, and arrow draws a pointer back to it.

The panel flips to the opposite side rather than running off the viewport, so side is a preference.

Width and padding

The panel has a width by default. Set width="none" for content that knows its own size — a colour grid, a menu, an image.

Props

PropTypeDefaultDescription
openbooleanTwo-way via v-model:open
side'top' | 'right' | 'bottom' | 'left''bottom'Preferred side; flips to stay on screen
align'start' | 'center' | 'end''center'
sideOffsetnumber6Gap between panel and trigger
arrowbooleanfalseDraw a pointer back to the trigger
modalbooleanfalseTrap focus and make the page inert
showClosebooleanfalseClose button in the corner
closeLabelstring'Close'Names that button
titlestringHeading line; the only row inset to clear the close button
padding'none' | 'sm' | 'md' | 'lg''md'
width'none' | 'sm' | 'md' | 'lg''md'none lets the content size itself
ariaLabelstringNames the panel
unstyledbooleanSkip built-in classes
ui{ content?, arrow?, close? }Per-slot class overrides

Slots

SlotPropsDescription
triggerWhat opens the popover
titleReplaces the heading line
default{ close }The panel's content

Accessibility

The panel is a dialog to assistive technology, so name it with ariaLabel. Escape closes it and focus returns to the trigger; with modal, focus is trapped inside while it is open.

The close button overlaps the panel's own padding, so content still reaches the full width. Only title is inset to make room for it.