Components
Accordion
Collapsible panel container that wraps Base UI Accordion, supporting one
(default) or several (multiple) open items. Works controlled (value) or
uncontrolled (defaultValue); compose with AccordionItem, AccordionTrigger,
and AccordionContent. Values are always arrays of item values.
Usage
Best practices
Leave
multipleoff for one-at-a-time panels or set it to allow several open at once;value/defaultValueare arrays either way, and an open item can always be closed again.Reach for
Collapsibleinstead when there is a single expandable region -Accordionis for a set of grouped items keyed byvalue.Children must be
AccordionItems (each withAccordionTrigger/AccordionContent); the item'svalueis whatvalue/defaultValuematch against.
Props
Accordion
AccordionContent
AccordionItem
AccordionTrigger
Also exports
- const
accordionAnatomy
Anatomy
Composition
Builds on