Props
| Name | Description |
|---|---|
activator Type: ElementOrComponentRef | External activator element or component ref. When provided, the activator slot is not rendered and click events are attached programmatically to the referenced element. For a trigger that already exists elsewhere — a toolbar button, a table cell. The listeners and the ARIA are attached to that element directly, so there is nothing to spread and the |
adaptive Type: booleanDefaultconfig.adaptive (true) | On mobile (below Three-state on purpose: unset falls back to the plugin config ( |
boundary Type: ElementOrComponentRefOrSelector | Constrains the popover within a bounding element: it stays inside it alongside its trigger (sideways for a popover above or below); away from the trigger it may pass the edge, and it flips at the viewport only. Accepts an HTMLElement, a Vue component ref, or a CSS selector string. Keeps the flip and shift maths inside a container instead of the viewport — a sidebar, a scrolling card. Reach for it when the panel escapes a region it should stay inside, not as a default. See example |
disabled Type: booleanDefaultfalse | Disables the component. Suppresses opening and marks the slot activator disabled. It does not close a panel that is already open — write |
eager Type: booleanDefaultfalse | Renders the panel's content at mount instead of on the first open (the phone sheet's too). The body is lazy: it renders on first open, so a query against the panel before then finds nothing. Turn this on to pre-measure a chart or to let a test read the panel while it is closed. |
focusTarget Type: string | Selector for the element that receives focus after opening. Defaults to the first focusable element inside the popover. A CSS selector resolved inside the panel. Worth setting when the first focusable element is not the one the reader came for — a header Reset button ahead of the body search field. See example |
id Type: string | The activator's id (the panel is |
modal Type: booleanDefaultfalse | Makes the floating panel modal: the page behind is inert and does not scroll, and Tab stays inside. Off, it is a non-modal dialog: an outside click closes it and still lands, and tabbing out closes it. The phone sheet is modal either way. Off by default: the page stays live, an outside click closes the panel and still reaches its target, and Tab past the last control closes it. Turn it on when the reader must finish or dismiss the panel first. The phone sheet is modal either way. See example |
modelValue Type: booleanDefaultfalse | Used by v-model to open / close the popover. A popover with no |
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the The properties are |
offset Type: numberDefault4 | Space the floating container will maintain from the activator. See example |
padding Type: numberDefault10 | Minimum empty space to keep from the edge of the page. The gap from the edge of the page, not the panel's inner padding. That one is CSS on |
placement Type: Placement | "cursor"Default"bottom" | Position of the popover relative to the activator. Use A v3 popover never draws an arrow, so the only thing |
pt Type: PtMap<BbPopoverPtPart, "open"> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
scrollable Type: booleanDefaultfalse | Caps the popover height to the available viewport space and enables internal scrolling. Useful for tall content like filter panels. Not recommended for atomic popovers (calendars, color pickers). Caps the panel at the space left for the resolved placement, after any flip. Right for a feed or a filter list; wrong for atomic content such as a calendar or a colour picker. See example |
transitionDuration Type: numberDefault250 | How long the transition has to last in milliseconds. |
trigger Type: PopoverTrigger | PopoverTrigger[]Default"click" | Interaction(s) that open the popover. Accepts a single trigger or an array to combine them.
-
|
width Type: string | number | Width of the popover. Accepts pixels or percentage (relative to activator width). Pixels, or a percentage of the trigger's width — only the percentage form re-measures when the trigger resizes. Ignored entirely by the adaptive mobile sheet. See example |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: boolean | The replacement for the template-ref |
Events
| Name | Description |
|---|---|
hide Type: (): void | Emitted as soon as the popover starts to close (model becomes false). |
show Type: (): void | Emitted as soon as the popover starts to open (model becomes true). |
shown Type: (): void | Emitted after the popover is fully opened and focus has been moved inside. Fires once the open transition has run and focus has moved inside, on the floating panel and on the phone sheet alike: the safe point for anything that assumes focus has settled. See example |
update:modelValue Type: (value: boolean): void | Emitted with the new value whenever |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
activator Type: BbPopoverActivatorSlotProps | The element that triggers the popover to open. Spread Spread |
default Type: BbPopoverDefaultSlotProps | The popover body content rendered inside the floating panel. The scope carries |
footer Type: BbPopoverDefaultSlotProps | Content pinned to the bottom of the panel, outside the scroll region. Stays visible while the body scrolls (when |
header Type: BbPopoverDefaultSlotProps | Content pinned to the top of the panel, outside the scroll region. Stays visible while the body scrolls (when |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
arrowPaddingremovedfails silentlyblockremovedfails silently- method
closeremovedfails silentlyNo template-ref API in v3: bind
v-modeland writetrue/false; the popover writesfalseback when it is dismissed. closeLabelremovedfails silentlyhideArrowremovedfails silently- method
isOpenremovedfails silentlyRead the
v-modelvalue instead. restoreFocusremovedfails silently- method
showremovedfails silentlyNo template-ref API in v3: bind
v-modeland writetrue/false; the popover writesfalseback when it is dismissed. showArrowremovedfails silentlyshowCloseremovedfails silentlythemeremovedfails silently