Accordion

Vertically stacked, collapsible content sections

Category: navigation · WCAG 2.2-AA · navigation, collapse, disclosure

States

Props

PropTypeDefaultDescription
type'single' | 'multiple'singleWhether one or multiple sections can be open at once ('single' | 'multiple').
defaultValuestring | string[]The initial value when uncontrolled.
valuestring | string[]The controlled value.
onValueChange(value: string | string[]) => voidCalled with the new value when it changes.

Design tokens

When to use

When not to use

How to build an accessible Accordion in React →

Examples

Single

<Accordion type="single" defaultValue="a"><AccordionItem value="a"><AccordionTrigger>Section</AccordionTrigger><AccordionContent>…</AccordionContent></AccordionItem></Accordion>

Related components

← Back to docs