Props
| Name | Description |
|---|---|
activeClass Type: string | Class to apply when the link is active. |
adaptive Type: booleanDefaultconfig.adaptive (true) | On mobile (below Forwarded to the menu: unset follows the global |
append:icon Type: string | Icon to be added on the right of the text. |
ariaCurrentValue Type: "page" | "step" | "location" | "date" | "time" | "true" | "false"Default'page' | Value passed to the attribute |
async Type: booleanDefaultfalse | Inertia: runs the visit without blocking — the page stays interactive and several async visits can be in flight at once. |
block Type: booleanDefaultfalse | Displays the component as full width. The extra width goes to the main button; the toggle keeps its own. Useful in a narrow column, not as a way to make the two halves match. See example |
cacheFor Type: string | number | (string | number)[] | Inertia: how long a prefetched response stays fresh before it is re-fetched. A single duration, or |
cacheTags Type: string | string[] | Inertia: tags to file this visit's prefetch cache under, so a later request can invalidate the whole tagged group. |
closeOnSelect Type: booleanDefaultunset (close after a single-choice change) | Whether a selection closes the menu. Unset: a change in a single-choice group closes it (an untick too, at any depth); a |
compact Type: booleanDefaultfalse | Compact density, the Menu rows only (28px → 24px on the flyout, 44px → 36px on the sheet); the split button’s own height comes from |
component Type: string | Inertia: the page component this visit resolves to. Rarely set by hand — the server normally decides it. |
data Type: object | Request payload forwarded to Inertia when navigating via |
disableAutoLoading Type: booleanDefaultfalse | Disables the automatic loading state that tracks async actions (enabled by default). Only affects the main action button: the split toggle half still mirrors the dropdown's internal async-action loading state. Opts the main button out of tracking its own async |
disabled Type: booleanDefaultfalse | Disables both halves: the main button and the menu toggle. Freezes both halves at once. v2 |
download Type: string | boolean | Marks an |
eager Type: booleanDefaultfalse | Renders the menu panel at mount instead of on the first open (the phone sheet's too), and keeps its rows after a close. Without it the rows mount on each open and go once the menu has closed. |
exactActiveClass Type: string | Class to apply when the link is exact active. |
except Type: string[] | Inertia: the inverse of |
external Type: booleanDefaultfalse | Forces an |
form Type: string | The id of the |
headers Type: object | Additional HTTP headers forwarded to Inertia when navigating via |
href Type: string | Returns the hyperlink's URL. Can be set, to change the URL. |
icon Type: string | Used when only an icon with no text should be displayed. |
id Type: string | Names this dropdown: the activator's id (unless it already has one), the menu's |
instant Type: booleanDefaultfalse | Inertia: navigate optimistically on click and reconcile when the response lands, instead of waiting for the round trip. |
interactiveWhileLoading Type: booleanDefaultfalse | Keeps the button clickable while it is loading. Buttons are disabled while loading by default; this escape hatch exists for toggles that must stay interactive (e.g. the dropdown-button caret). |
items Type: BbDropdownItem[] | The menu: every entry is a row (BbDropdown's item model, groups and submenus included). The main action is the component itself (its default slot, Only the menu: every entry is a row, with BbDropdown’s item model (groups and submenus included). The main action is the component itself: its default slot, |
loading Type: booleanDefaultfalse | Triggers a loading indicator. A loading button is soft-disabled on its own ( Drives the main button by hand, for work the component cannot see. It does not touch the toggle. See example |
method Type: "get" | "post" | "put" | "patch" | "delete" | HTTP method used for Inertia navigation when |
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the Reaches the phone sheet only, e.g. a |
offset Type: numberDefault4 | Space the floating container will maintain from the activator. |
onBefore Type: (() => void) | Lifecycle hook invoked by Inertia right before the request is sent. |
onCancel Type: (() => void) | Lifecycle hook invoked by Inertia when a request is cancelled. |
onCancelToken Type: ((cancelToken: unknown) => void) | Receives the Inertia cancel token source when a request is initiated. Can be used to cancel the request.
Typed platform-agnostically (matching BbButton) so the library's types never require |
onError Type: ((errors: Record<string, string>) => void) | Inertia's hook for a VALIDATION error answer (the 422 path): the only failure callback |
onFinish Type: (() => void) | Lifecycle hook invoked by Inertia after the request has finished (regardless of success or error). |
only Type: string[] | Limits the properties that are preserved in Inertia partial reloads. |
onPrefetched Type: (() => void) | Lifecycle hook invoked by Inertia when a prefetch for this link has completed and is cached. |
onPrefetching Type: (() => void) | Lifecycle hook invoked by Inertia when a prefetch for this link starts. |
onProgress Type: ((progress: { percentage: number | undefined; }) => void) | Progress callback invoked by Inertia with the upload/download percentage when available. |
onStart Type: (() => void) | Lifecycle hook invoked by Inertia when a request starts. |
onSuccess Type: (() => void) | Lifecycle hook invoked by Inertia when a request succeeds. |
padding Type: numberDefault10 | Minimum empty space to keep from the edge of the page |
pageProps Type: Record<string, unknown> | ((currentProps: Record<string, unknown>, sharedProps: Record<string, unknown>) => Record<string, unknown>) | null | Inertia: props to merge into the next page optimistically, before the server responds. Either an object or a function of the current props.
Typed platform-agnostically (matching BbButton) so the library's types never require |
placement Type: Placement | "cursor"Default'bottom' | Position of the dropdown relative to the activator. Use Resolved against the whole split control, not the toggle that opened the menu — so the default |
prefetch Type: string | boolean | string[] | Inertia: fetch and cache this link's page ahead of the click. |
prepend:icon Type: string | Icon to be added on the left of the text. Dresses the main button, as on BbButton. A menu row takes its own |
preserveScroll Type: boolean | ((props: Record<string, unknown>) => boolean)Defaultfalse | Controls whether Inertia should preserve the current scroll position after navigation. Can be a boolean or a predicate receiving the visit props. |
preserveState Type: boolean | ((props: Record<string, unknown>) => boolean) | nullDefaultfalse | Controls whether Inertia should preserve the current state after navigation. Can be a boolean or a predicate receiving the visit props. |
preserveUrl Type: booleanDefaultfalse | Inertia: keep the current URL in the address bar even though the page content changes. |
pt Type: BbDropdownButtonPtMap | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | ((ctx: PtItemCtx<InternalItem, BbDropdownButtonPtState, "default" | "destructive">) => PtItemResult) | Passthrough, attribute form: one attribute per part,
|
queryStringArrayFormat Type: "brackets" | "indices"Default'brackets' | Format to use when serializing array values into the query string for Inertia requests. |
replace Type: booleanDefaultfalse | Calls |
size Type: Responsive<Sizes>Default"md" | Sets the size of the button. When the value is a string, it will be applied to all screen sizes. Otherwise, it will be applied to the screen size specified by the object. Shared by both halves, and takes the responsive map form ( |
tag Type: ButtonTagDefault'button' | Element to render for the plain (non-link, non-router) button: |
target Type: string | Sets or retrieves the window or frame at which to target content. |
text Type: string | Text content of the component. |
to Type: string | wt | bt | Route Location the link should navigate to when clicked on. |
toggle:icon Type: string | Replaces the chevron shown inside the dropdown toggle button. A constrained alternative to a slot: only the toggle's icon changes, so the button keeps its semantics. Named after the part it sits in (the Swaps the toggle’s chevron and nothing else — an overflow "…" for a dense row. Deliberately a prop rather than a slot: there is no |
transitionDuration Type: numberDefault150 | How long the transition has to last in milliseconds. Menus use the fast transition (150) rather than the medium one (250) the other popovers default to: a menu is opened to pick one command and is gone again, so it answers faster than a panel the user reads or edits in. |
type Type: "button" | "submit" | "reset" | Gets the classification and default behavior of the button. |
variant Type: ButtonVariantTypeDefault"primary" | Visual variant shared by both buttons of the split control. Shared by both halves, from BbButton’s ladder — a name registered through |
viewTransition Type: booleanDefaultfalse | Inertia: run the page swap inside a View Transition, where the browser supports one. |
width Type: string | numberDefault'auto' | Width of the dropdown in pixels, percentage, or 'auto' to fit content. A percentage resolves against the split control’s width, still floored at the menu’s 128px minimum. |
Events
| Name | Description |
|---|---|
hide Type: (): void | Emitted as soon as the menu starts to close. |
item:selected Type: (value: any): void | A row of a selectable group was selected — the menu's own event, re-emitted with the same payload (the item's resolved value). Re-emitted from the menu with the same payload, the row’s value. Bind the group’s |
item:unselected Type: (value: any): void | A row of a selectable group was unselected (same payload as above). See example |
show Type: (): void | Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open. |
shown Type: (): void | Emitted once the menu is open and its open transition has finished. |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
<groupId> Type: BbDropdownItemSlotProps | That group's title line (the group is passed as |
<groupId>:append Type: BbDropdownItemSlotProps | The trailing region of that group's title line. |
<groupId>:item Type: BbDropdownItemSlotProps | The content of every row of that group, and no other; a row's own |
<groupId>:item:append Type: BbDropdownItemSlotProps | The trailing region of every row of that group; replaces their |
<groupId>:item:prepend Type: BbDropdownItemSlotProps | The leading region of every row of that group — e.g. an avatar per record, drawn from |
<groupId>:prepend Type: BbDropdownItemSlotProps | The leading region of that group's title line. |
<value> Type: BbDropdownItemSlotProps | One row's content (label and description), by its value; in a fetched group, by its resolved |
<value>:append Type: BbDropdownItemSlotProps | One row's trailing region; replaces its |
<value>:prepend Type: BbDropdownItemSlotProps | One row's leading region; replaces its |
append:icon Type: BbButtonIconSlotProps | The main button's trailing icon, replacing |
default Type: any | The main button's label (falls back to |
dropdown Type: any | Menu companions, forwarded into the dropdown: a |
empty Type: BbDropdownPlaceholderSlotProps | Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. Forwarded to the underlying |
footer Type: BbDropdownButtonEdgeSlotProps | Content pinned to the bottom of the dropdown panel, outside the scroll area. See example |
header Type: BbDropdownButtonEdgeSlotProps | Content pinned to the top of the dropdown panel, outside the scroll area. Forwarded into the inner dropdown unchanged, along with |
icon Type: BbButtonIconSlotProps | The main button's icon, replacing the |
item:append Type: BbDropdownButtonItemSlotProps | The trailing region of every menu row, replacing its |
item:prepend Type: BbDropdownButtonItemSlotProps | The leading region of every menu row, replacing its Replaces every menu row’s |
loading Type: BbDropdownPlaceholderSlotProps | Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group. Forwarded to the underlying |
prepend:icon Type: BbButtonIconSlotProps | The main button's leading icon, replacing |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
arrowPaddingremovedfails silentlyautoLoadingdisableAutoLoadingfails silently- item field
items[].keyitems[].valuefails silentlyA row's identity: its
v-modelvalue (any type, compared by hash) and its#<value>slots;check --fixrenames it. - item field
items[].textitems[].labelfails silentlyA row's text;
check --fixrenames it. - item field
items[group].keyitems[group].idfails silentlyA group's identity, the same word as
<BbDropdownGroup id>;check --fixrenames it. - slot
no-dataemptyfails silently right:icontoggle:iconfails silentlythemevariantfails silently