Accordion

Collapsible content sections. Single or multiple mode. Compound component with Item, Trigger, and Panel.

Example

Token-driven design system with accessible primitives, compound components, and theme support.

Props

NameTypeDefaultRequiredDescription
type'single' | 'multiple''single'NoAllow one or many items open at once
valuestring | string[]NoControlled expanded value(s)
defaultValuestring | string[]NoInitial expanded value(s) (uncontrolled)
onChange(value: string | string[]) => voidNoCalled when expansion changes
collapsiblebooleantrueNoAllow collapsing the last open item in single mode

Accessibility

  • Trigger: <button> with aria-expanded and aria-controls
  • Panel: role="region" with aria-labelledby
  • Enter/Space toggle (native button behavior)
  • data-state="open"|"closed" on items

Related Tokens

--accordion-border-color--accordion-trigger--accordion-panel--accordion-indicator