Props
| Name | Type | Default | Description |
|---|---|---|---|
block | boolean | undefined | false | Displays the component as full width. Full width with equal-width triggers, measured from the widest so they stay even once the strip overflows. Horizontal only. It replaces the full-width class most v2 projects wrote for themselves — delete yours, or the two fight over the same declarations with nothing to say which won. See example |
compact | boolean | undefined | false | Adds a CSS class that applies a compact style to the component. Drops the whole scale one notch — a 28px strip with smaller text and padding — so it lines up with compact fields. See example |
direction | "horizontal" | "vertical" | undefined | "horizontal" | Direction of the tabs component. A vertical strip becomes a column beside the panes and answers Up/Down as well as Left/Right. It also reads a |
disableAnimateX | boolean | undefined | false | Disables the horizontal slide transition between tab panels (enabled by default). Inverted from v2's |
disableAnimateY | boolean | undefined | false | Disables the smooth height animation when switching between tab panels (enabled by default). Inverted from v2's |
disabled | boolean | undefined | false | Disables the component Disables the whole group: every trigger goes disabled and keyboard navigation is inert. For a single unreachable tab, set |
eager | boolean | undefined | false | Prevents rendering content before it's made visible. Mounts every pane from the first render and keeps it mounted, hidden while inactive; a lazy pane unmounts on every switch away and loses its state. Prefer the per-item form ( |
headers | Record<string, string> | undefined | - | Additional HTTP headers forwarded to Inertia when navigation is triggered. Only meaningful in an Inertia context. |
id | string | undefined | - | The identifier of the component. Also the address for |
itemsrequired | BbTabsItem<K>[] | - | Array of items that define the tabs in the component. Each entry carries its own |
modelValue | K | null | undefined | - | The current tab key. Used by v-model. The raw item key, never the normalized slug. Leave it unbound (or |
navigation | boolean | undefined | false | Synchronizes the current tab with the URL query parameter.
Pair it with Makes the strip a writer of the URL query. Pair it with |
onBefore | (() => boolean | void) | undefined | - | Inertia lifecycle hook — fired just before the request is sent.
Return |
onCancel | (() => void) | undefined | - | Inertia lifecycle hook — fired when the request is cancelled. |
onError | ((errors: Record<string, string>) => void) | undefined | - | Inertia lifecycle hook — fired when the server returns validation errors. |
onFinish | (() => void) | undefined | - | Inertia lifecycle hook — fired after the visit finishes (success or error). |
only | string[] | undefined | - | Limits which server-side props are refreshed during a partial Inertia reload. Only meaningful in an Inertia context. |
onProgress | ((progress: { percentage: number | undefined; }) => void) | undefined | - | Inertia lifecycle hook — fired when upload/download progress is available. |
onStart | (() => void) | undefined | - | Inertia lifecycle hook — fired when the request starts. |
onSuccess | (() => void) | undefined | - | Inertia lifecycle hook — fired when the visit completes successfully. |
preserveScroll | boolean | ((props: Record<string, unknown>) => boolean) | undefined | - | Controls whether Inertia preserves the scroll position after navigation. Only meaningful in an Inertia context. |
preserveState | boolean | ((props: Record<string, unknown>) => boolean) | null | undefined | - | Controls whether Inertia preserves the current component state after navigation. Only meaningful in an Inertia context. |
pt | PtItemMap<BbTabsPtPart, "item", BbTabsPtState, BbTabsItem<K>> | undefined | - | Passthrough, object form: the same keys as the |
pt:item | PtValue | ((ctx: PtItemCtx<BbTabsItem<K>, BbTabsPtState>) => PtItemResult) | undefined | - | |
pt:item:active | PtValue | undefined | - | |
pt:item:disabled | PtValue | undefined | - | |
pt:panel | PtValue | undefined | - | |
pt:panel:active | PtValue | undefined | - | |
pt:panel:disabled | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:active | PtValue | undefined | - | |
pt:root:disabled | PtValue | undefined | - | |
queryKey | string | undefined | "tab" | Defines the query key used for URL-based navigation. Spelled |
replace | boolean | undefined | false | Replaces history rather than pushing it when changing tab.
Recommended default whenever Effectively required alongside |
server | boolean | undefined | false | When true and in an Inertia context, triggers a real server-side Inertia
visit instead of a client-only |
variant | keyof TabsVariantRegistry | undefined | "pill" | Look of the tab strip. |
v-model
Values kept in sync through v-model.
| Name | Type | Description |
|---|---|---|
modelValue | K | null | undefined | See example |
Events
| Name | Type | Description |
|---|---|---|
update:modelValue | (e: "update:modelValue", value: K): void | Emitted when the selected tab changes. Used by The whole event surface. It also fires once on mount when the component resolves a key the parent never set — from the URL query or the first-enabled fallback — so a binding starts aligned. See example |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
<key> | BbTabsSlotProps<K> | One tab's content pane, by the tab The pane. Its name is the normalized key ( |
header:append | BbTabsScrollSlotProps | Content rendered after the scrollable tab label list (e.g. a right scroll arrow). The trailing counterpart of |
header:prepend | BbTabsScrollSlotProps | Content rendered before the scrollable tab label list (e.g. a left scroll arrow). Rendered outside the scrollable list, so it stays put while the strip moves. The buttons are your markup, which means an icon-only arrow needs an |
label | BbTabsSlotProps<K> | Fallback slot used for all tab labels when no per-tab The fallback for every trigger; a |
label:<key> | BbTabsSlotProps<K> | One tab trigger's label, by the tab The key is normalized: |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
animateXdisableAnimateXfails silentlyanimateYdisableAnimateYfails silentlyquerykeyqueryKeyfails silently