Props
| Name | Description |
|---|---|
eager Type: booleanDefaultfalse | Renders the content at mount, while closed, instead of on the first open. Closed content is The body is otherwise deferred to the first open. Reach for |
headingLevel Type: 1 | 2 | 3 | 4 | 5 | 6 | Wraps the header button in a heading of this level ( |
id Type: string | The root's Makes the markup predictable: the body takes your id and the header button takes |
modelValue Type: booleanDefaultfalse | Used by v-model to trigger opening / closing the collapsible. An accordion with no One panel, one boolean. There is no group component: compose several accordions, and for single-open behaviour derive every panel from one active key rather than watching siblings. See example |
pt Type: PtMap<BbAccordionPtPart, "open"> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
title Type: string | The trigger's text, with a chevron at its end that turns when open, in the default look (padding, a hairline under the item). |
transitionDuration Type: numberDefault250 | How long the transition has to last in milliseconds Milliseconds; the manifest default resolves to 250. One value drives the height and the fade together, and |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: boolean | See example |
Events
| Name | Description |
|---|---|
update:modelValue Type: (value: boolean): void | Emitted with the new value whenever Emitted on every toggle (a header click or a |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
default Type: BbAccordionToggleSlotProps | The collapsible body content shown when the accordion is open. Receives the same |
header Type: BbAccordionToggleSlotProps | Replaces the whole trigger content: the text and the chevron, and the default look with them. The button, its ARIA and its focus ring stay. Rendered inside the header button, which the component owns. Never put a |
title Type: BbAccordionToggleSlotProps | Replaces the trigger's text only (the |