Props
| Name | Type | Default | Description |
|---|---|---|---|
eager | boolean | undefined | false | Prevents rendering content before it's made visible. The body is otherwise deferred to the first open. Reach for |
id | string | undefined | - | The identifier of the component. Makes the markup predictable: the body takes your id and the header button takes |
modelValue | boolean | undefined | false | 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 | PtMap<BbAccordionPtPart, "open"> | undefined | - | Passthrough, object form: the same keys as the |
pt:header | PtValue | undefined | - | |
pt:header:open | PtValue | undefined | - | |
pt:panel | PtValue | undefined | - | |
pt:panel:open | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:open | PtValue | undefined | - | |
transitionDuration | number | undefined | 250 | 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 | Type | Description |
|---|---|---|
modelValue | boolean | undefined | See example |
Events
| Name | Type | Description |
|---|---|---|
update:modelValue | (event: "update:modelValue", value: boolean): void | Emitted on every toggle — a header click or a |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
default | BbAccordionToggleSlotProps | The collapsible body content shown when the accordion is open. Receives the same |
header | BbAccordionToggleSlotProps | Content rendered inside the accordion header button. Rendered inside the header button, which the component owns. Never put a |