Accordion
Use accordions to hide secondary details until readers need them.
Choose interaction behavior
Decide the open and close behavior first, then choose your structure.
Independent accordions (no group)
Place multiple Accordion components one after another to let readers open any combination.
Dependent accordions (single-open group)
Wrap items in AccordionGroup when opening one item should close the currently open item.
Start an accordion open
Set defaultOpen to start a standalone accordion in the open state.
Appearance
Add an icon
Use icon to display an icon next to the accordion title.
Change title size
Use titleSize to adjust the heading size.
Props
| Prop | Description | Type | Default |
|---|---|---|---|
title | Text shown in the accordion header. | string | — |
icon | Optional icon name, for example lucide:check-circle. | string | — |
defaultOpen | Starts open for standalone accordions. | boolean | false |
titleSize | Optional size for the title text. | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "md" |