Props
| Name | Description |
|---|---|
activator Type: Record<string, any> | HTMLElement | null | External activator element or component ref. When provided, the activator slot is not rendered and event listeners are attached programmatically to the referenced element. |
adaptive Type: booleanDefaultconfig.adaptive (true) | On mobile, the panel opens as a bottom sheet instead of a floating popover, with the same search and list. Unset, the global Set it per instance only to disagree with the app-wide |
anchor Type: Record<string, any> | HTMLElement | nullDefaultnull | Override the element used for popover positioning and width measurement. Useful when the focusable activator is narrower than its visual container (e.g. a button inside a wrapper). Falls back to |
ariaDescribedby Type: string | string[] | Space-separated IDREF(s) that describe this field for assistive technologies. Accepts either a string or array of ids. The popover has no message area. Render the error or warning next to your trigger and pass its id here: it lands on the trigger and on the search field. See example |
ariaInvalid Type: boolean | Explicit invalid state for accessibility semantics. Falls back to |
autocomplete Type: stringDefault"off" | Browser autocomplete hint for the popover search input. |
boundary Type: string | Record<string, any> | HTMLElement | null | Constrains the popover to a specific boundary 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. |
clearable Type: booleanDefaultfalse | Shows a clear button in the search field, in the lens' place while there is a query or a selection; it resets both. None without a search field. Leave it off when the activator already clears (as BbSelect's does). Puts a small clear button inside the search field's icon stack (not on your trigger), so a list without a search field gets none. For an explicit "empty this" most triggers want the |
compact Type: booleanDefaultfalse | Apply the compact density variant. |
dependencies Type: unknown[]Default[] | Additional dependencies that trigger item reloading when changed. Compared by value hash, not by reference. Pair it with |
depsDebounceTime Type: numberDefault0 | Debounce delay (ms) for dependency-triggered reloads. |
disabled Type: booleanDefaultfalse | Disables the component. |
disableFlip Type: booleanDefaultfalse | Disables the automatic flip to the opposite side when the popover would overflow (flipping is on by default). Inverts v2's |
disableWriting Type: boolean | "auto" | "mobile" | "desktop"Default'auto' | Hides the panel's search field: Removes the search field, and with it typing, |
emptyText Type: string | Message displayed when no items are available. |
enforceCoherence Type: booleanDefaultfalse | Drops the picks the items no longer contain (single: Opts each instance into a load of its own, because validating a seeded value is impossible without options. One filter costs one request; fifty provider-backed rows cost fifty. That is the reason a table hands every row the same array instead. See example |
failedText Type: stringDefaultthe localized common.failedText ("Couldn't load items") | Message displayed in the empty state while the latest load FAILED (the provider threw): the twin of |
filterBy Type: false | string[]Default[] | What typing filters on: empty = the display text and description; item paths = those fields ( Replaces the match against the display text rather than adding to it, and every listed path must exist on every item or matching throws. With a provider it still applies on top of the response; |
groupBy Type: string | ((item: Item) => string | number | symbol) | Path to item property for grouping options. |
hasErrors Type: booleanDefaultfalse | Marks the component as being in error state. Paints the error icon in the search field and sets |
hasWarnings Type: booleanDefaultfalse | Marks the component as being in a warning state. Visually mirrors |
headerHeight Type: number | Height of group headers in the listbox (px). Defaults to 32px (24px compact; 36px / 32px on mobile viewports). Only applies when |
id Type: string | Seeds the ids the popover sets: its listbox is |
itemHeight Type: numberDefault28 | Height of the options in the listbox (px). Defaults to 28px (24px compact; 44px / 36px on mobile viewports). An explicit value wins on every viewport. |
itemProps Type: BbSelectItemProps<Item> | ADDITIONAL row fields, never the text or value: |
items requiredType: Item[] | ((context: BbSelectPopoverItemsContext) => Item[] | Promise<Item[]>)Default[] | The options: an array, or a sync or async provider given a An array resolves on mount and costs nothing per instance, which is what makes one popover per table row viable. A function is per-instance, so reach for it only when the options genuinely depend on that instance. See example |
itemText Type: ItemAccessor<Item, string>Defaultown label, else text, else JSON.stringify(item) | Path to item property for display text or function to extract it.
Unset: own |
itemValue Type: ItemAccessor<Item>Defaultown value, else the whole item | Path to item property for value or function to extract it.
Unset: own |
knownItems Type: ([Known] extends [undefined] ? BbSelectKnownItems : Known) |
|
loading Type: booleanDefaultfalse | Display the loading state styles. |
loadingText Type: string | Message shown while items are being loaded. |
max Type: numberDefaultInfinity | Maximum number of selectable items (limits selection when Applies to |
modelValue requiredType: any | v-model value. Single value for single select, array for multiple select. |
modelValueDebounceTime Type: numberDefault0 | Debounce delay (ms) for modelValue change handling. |
multiple Type: booleanDefaultfalse | Enable multiple item selection. When true, modelValue must be an array. The model must already be an array on the first render, and there is no chip row: summarising the selection on your trigger is part of owning it. See example |
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the |
offset Type: numberDefault4 | Distance (px) between the activator and the popover. |
padding Type: numberDefault10 | Minimum page padding used by floating shift middleware. |
placement Type: PlacementDefault"bottom" | Floating placement of the popover. |
prefill Type: boolean | "interaction"Default"interaction" | When the options first load: Unlike an in-field |
pt Type: PtItemMap<BbSelectPopoverPtPart, BbSelectPopoverOptionPtPart, BbSelectPopoverPtState, Item, never, BbSelectSlotRow<Item, Known>> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | ((ctx: PtItemCtx<Item, BbSelectPopoverPtState, never, BbSelectSlotRow<Item, Known>>) => PtItemResult) | Passthrough, attribute form: one attribute per part, |
queryDebounceTime Type: numberDefault500 | Debounce delay (ms) before triggering search queries after user input stops. |
readonly Type: booleanDefaultfalse | Prevents opening the popover while keeping the activator accessible. |
searchInputAriaLabel Type: stringDefaultt('select.searchLabel') ('Search options') | Accessible label used by the search input rendered inside the popover. Falls back to the localized Names the in-panel search field, which defaults to the localized "Search options". It is not the trigger's name: that is the |
selectable Type: boolean | ((item: Item) => boolean)Defaulttrue | Defines whether options are selectable. Can be a global boolean that affects all options or a function that accepts an item and returns a boolean that only affects that item. Non-selectable options are rendered disabled. |
stash Type: booleanDefaultfalse | Keeps picked options named across searches: a pick stays resolvable when a later search or a failed load no longer returns it. It follows the model, and does not keep a pick valid: Keeps picked options resolvable across searches. It does not help a trigger label, which should never depend on what the component has loaded. See example |
transitionDuration Type: numberDefault250 | Transition duration (ms) for popover show/hide animations. |
width Type: string | numberDefault"200" | Width of the popover in pixels, percentage, or Defaults to |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: any | Holds a single value, or an array under |
Events
| Name | Description |
|---|---|
active Type: (): void | Emitted when the component becomes active (focus enters it). |
blur Type: (event: FocusEvent): void | Emitted when the activator loses focus. |
change Type: (event: Event): void | Emitted when the value changes via native change event. |
click Type: (event: MouseEvent): void | Emitted when the activator is clicked. |
focus Type: (event: FocusEvent): void | Emitted when the activator receives focus. |
hide Type: (): void | Emitted as soon as the options surface starts to close. |
inactive Type: (): void | Emitted when focus moves outside the entire component after it was active. React on this, not on |
input Type: (event: Event): void | Emitted on native input events from the search input. |
option:add Type: (text: string): void | Emitted when the user types a new value and confirms it (Enter key) while writing is enabled (i.e. |
show Type: (): void | Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone). |
shown Type: (): void | Emitted once the options surface is open and its open transition has finished. |
update:modelValue Type: (value: any): void | Emitted with the next selection value whenever selection changes. |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
activator Type: BbSelectPopoverActivatorSlotProps | Replaces the default trigger element that opens the select popover. Spread |
empty Type: { query: string; focus: () => void; error: unknown; } | Content shown when no options match the query or the list is empty. |
footer Type: BbSelectPopoverPanelSlotProps | Content pinned to the bottom of the panel, below the options list. Rendered in both the desktop popover and the adaptive sheet. Renders below the options list in the desktop popover and the mobile sheet alike. Your trigger is not a form field, so it has no clear button of its own; |
group Type: BbSelectPopoverGroupSlotProps<Item> | Replaces the default group header rendered above grouped options. Not called for rows with no group ( |
header Type: BbSelectPopoverPanelSlotProps | Content pinned to the top of the panel, above the search field. Rendered in both the desktop popover and the adaptive sheet. Renders above the search field. On a trigger with no label, a title here is often the only place the panel says what it is for. See example |
loading Type: { query: string; } | Content shown inside the options dropdown while items are loading. |
option Type: BbSelectPopoverOptionSlotProps<Item, Known> | Replaces the default rendering of each option row in the dropdown. With |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
allowWritingdisableWritingfails silentlyarrowPaddingremovedfails silentlyflipdisableFlipfails silentlyhasWarninghasWarningsfails silentlyhideArrowremovedfails silently- slot
no-dataemptyfails silently noDataTextemptyTextfails silentlyshowArrowremovedfails silently