Accordion
No consumersCollapse long content into labelled sections the reader opens on demand.
For content a reader will want some of. If they need all of it, an accordion just adds clicks; if they need one part and you know which, do not hide it behind a trigger.
Single
The default: opening one section closes the others. defaultValue takes an array of item values even in single mode.
Title, description and social preview.
Multiple
Display, direction, alignment.
Family, size, weight, tracking.
Props
Accordion
| Prop | Type | Default | Description |
|---|---|---|---|
type | "single" | "multiple" | "single" | Whether more than one item can be open at once. |
defaultValue | string[] | [] | Item values open on first render. |
AccordionItem
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Required. Identifies the item to the accordion's open set. |