Props
| Name | Type | Default | Description |
|---|---|---|---|
activator | Record<string, any> | HTMLElement | null | undefined | - | External activator element or component ref.
When provided, the activator slot is not rendered and event listeners
are attached programmatically to the referenced element. ARIA
( The no-wrapper alternative to the |
adaptive | boolean | undefined | `config.adaptive` (`true`) | On mobile viewports (below Unset resolves to the global |
anchor | Record<string, any> | HTMLElement | null | undefined | the activator element | Element the panel positions itself against, when it should differ from the
activator — e.g. a wrapper that the activator is only a part of, so the menu
aligns to the whole control while a single button opens it. Accepts an
HTMLElement or a Vue component ref. Also drives a percentage Positions the panel against something other than the trigger — the case being a control whose trigger is only part of it, like the toggle half of a split button. A percentage |
boundary | string | Record<string, any> | HTMLElement | null | undefined | - | Constrains the dropdown within a bounding element. Accepts an HTMLElement, a Vue component ref, or a CSS selector string. |
compact | boolean | undefined | false | Apply the compact density variant — the same ladder |
disabled | boolean | undefined | false | Disables the component Freezes the whole component, trigger included. It is not the same as disabling every item: a disabled item is skipped by keyboard navigation while the menu still opens. |
eager | boolean | undefined | false | Prevents rendering content before it's made visible. |
enforceCoherence | boolean | undefined | false | Default for pipeline groups: drop selections that are no longer present in a
group's current items (e.g. after a The dropdown-level default for pipeline groups, overridable per group. It stays lazy: a group nobody opened never fetches and never prunes, and pruning never runs against an empty or still-loading item set. See example |
id | string | undefined | - | The identifier of the component. |
itemsrequired | BbDropdownItem[] | [] | Array used to render each dropdown button.
They can act as Three shapes, mixable: an item, a nested array (a divider-separated section), or a group object. |
loadingText | string | undefined | - | Default placeholder text shown while a pipeline group's async items load.
A group's own Pipeline groups only, and the default for all of them; a group can override it with its own |
noDataText | string | undefined | - | Default placeholder text shown when a pipeline group resolves to no items.
A group's own The empty-result counterpart of |
offCanvasProps | Partial<BbOffCanvasProps> | undefined | - | Props for the phone sheet. A Merged over the sheet’s own |
offset | number | undefined | 3 | Space the floating container will maintain from the activator. |
padding | number | undefined | 10 | Minimum empty space to keep from the edge of the page |
placement | Placement | "cursor" | undefined | "bottom" | Position of the dropdown relative to the activator.
Use Every floating placement, plus |
pt | PtItemMap<BbDropdownPtPart, BbDropdownItemPtPart, BbDropdownPtState, InternalItem> | undefined | - | Passthrough, object form: the same keys as the |
pt:footer | PtValue | undefined | - | |
pt:footer:disabled | PtValue | undefined | - | |
pt:footer:open | PtValue | undefined | - | |
pt:footer:selected | PtValue | undefined | - | |
pt:header | PtValue | undefined | - | |
pt:header:disabled | PtValue | undefined | - | |
pt:header:open | PtValue | undefined | - | |
pt:header:selected | PtValue | undefined | - | |
pt:item | PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult) | undefined | - | |
pt:item-description | PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult) | undefined | - | |
pt:item-description:disabled | PtValue | undefined | - | |
pt:item-description:open | PtValue | undefined | - | |
pt:item-description:selected | PtValue | undefined | - | |
pt:item-icon | PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult) | undefined | - | |
pt:item-icon:disabled | PtValue | undefined | - | |
pt:item-icon:open | PtValue | undefined | - | |
pt:item-icon:selected | PtValue | undefined | - | |
pt:item-text | PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownPtState>) => PtItemResult) | undefined | - | |
pt:item-text:disabled | PtValue | undefined | - | |
pt:item-text:open | PtValue | undefined | - | |
pt:item-text:selected | PtValue | undefined | - | |
pt:item:disabled | PtValue | undefined | - | |
pt:item:open | PtValue | undefined | - | |
pt:item:selected | PtValue | undefined | - | |
pt:list | PtValue | undefined | - | |
pt:list:disabled | PtValue | undefined | - | |
pt:list:open | PtValue | undefined | - | |
pt:list:selected | PtValue | undefined | - | |
pt:panel | PtValue | undefined | - | |
pt:panel:disabled | PtValue | undefined | - | |
pt:panel:open | PtValue | undefined | - | |
pt:panel:selected | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:disabled | PtValue | undefined | - | |
pt:root:open | PtValue | undefined | - | |
pt:root:selected | PtValue | undefined | - | |
pt:sheet | PtValue | undefined | - | |
pt:sheet:disabled | PtValue | undefined | - | |
pt:sheet:open | PtValue | undefined | - | |
pt:sheet:selected | PtValue | undefined | - | |
queryDebounceTime | number | undefined | 300 | Debounce (ms) applied to the async re-fetch a Applies to a |
transitionDuration | number | undefined | 150 | How long the transition has to last in milliseconds. Menus use the fast transition rather than the medium one the other popovers default to. |
trigger | DropdownTrigger | DropdownTrigger[] | undefined | "click" | Interaction(s) that open the dropdown.
Accepts a single trigger or an array to combine them.
- Takes an array to combine them ( |
width | string | number | undefined | "auto" | Width of the dropdown in pixels, percentage, or 'auto' to fit content. Content-sized by default with a 128px floor — not a fixed width. Pass a number when menus have to line up across the rows of a table, and a percentage when the panel should match its trigger. See example |
Events
| Name | Type | Description |
|---|---|---|
hidden | (event: "hidden"): void | |
hide | (event: "hide"): void | |
item:selected | (event: "item:selected", value: any): void | Fires for any selectable group with the changed item’s value — its |
item:unselected | (event: "item:unselected", value: any): void | See example |
show | (event: "show"): void | |
shown | (event: "shown"): void |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
<groupKey> | BbDropdownItemSlotProps | That group's title line (the group is passed as |
<groupKey>:append | BbDropdownItemSlotProps | The trailing region of that group's title line. |
<groupKey>:item | BbDropdownItemSlotProps | The content of every row of that group, and no other; a row's own |
<groupKey>:item:append | BbDropdownItemSlotProps | The trailing region of every row of that group; replaces their |
<groupKey>:item:prepend | BbDropdownItemSlotProps | The leading region of every row of that group — e.g. an avatar per record, drawn from The switcher slot: draw each record (an avatar, a logo) from |
<groupKey>:prepend | BbDropdownItemSlotProps | The leading region of that group's title line. |
<key> | BbDropdownItemSlotProps | One row's content (text and description), by its key; in a fetched group, by its resolved |
<key>:append | BbDropdownItemSlotProps | One row's trailing region; replaces its The only slot that can replace a row’s submenu chevron. On the selected row of a selectable group the check still wins. See example |
<key>:prepend | BbDropdownItemSlotProps | One row's leading region; replaces its |
activator | BbDropdownActivatorSlotProps | The element that triggers the dropdown to open. Spread Spread its |
default | any | Hosts |
footer | BbDropdownEdgeSlotProps | Content pinned to the bottom of the dropdown panel, outside the scroll area. Stays visible while the items scroll and is separated from them by a divider — for action buttons. The pinned counterpart below the items, for one persistent action that must stay reachable while the list scrolls. |
header | BbDropdownEdgeSlotProps | Content pinned to the top of the dropdown panel, outside the scroll area. Stays visible while the items scroll and is separated from them by a divider — for a title or a filter field. Pinned above the scrolling items and separated by a divider — a title, or a field that filters the list you build. On the adaptive sheet it becomes the sheet’s pinned header. |
item:append | BbDropdownItemSlotProps | The trailing region of every row (and group title line), replacing its
Replaces the rows’ |
item:prepend | BbDropdownItemSlotProps | The leading region of every row (and group title line), replacing its
Rendered before every row’s content, group titles included — there |
loading | BbDropdownPlaceholderSlotProps | Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group. |
no-data | BbDropdownPlaceholderSlotProps | Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
arrowPaddingremovedfails silentlyoffcanvasPropsoffCanvasPropsfails silently