Components / Accordion

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Yes. It adheres to the WAI-ARIA design pattern.
Yes. It comes with default styles that matches the other components' aesthetic.
Yes. It's animated by default, but you can disable it if you prefer.

Collapsible

An interactive component which expands/collapses a panel.

@radix-ui/primitives
@radix-ui/colors
@radix-ui/react

Accordion API

Prop / EventTypeDefaultDescription
typestring'single'Determines whether one or multiple items can be opened at the same time.
collapsiblebooleanfalseWhen type is "single", allows closing content when clicking trigger for an open item.
modelValuestring | arrayundefinedThe controlled value of the item(s) to expand.

AccordionItem API

Prop / EventTypeDefaultDescription
valuestringundefinedA unique value for the item. Required.

Collapsible API

Prop / EventTypeDefaultDescription
modelValuebooleanundefinedThe controlled open state of the collapsible.
defaultOpenbooleanfalseThe default open state when initially rendered.