Accordion

layout

Collapsible content sections with single or multi-expand modes, animated chevron rotation, dividers between items, and full ARIA accordion pattern. Use for FAQs, settings panels, documentation sections, and pipeline step details.

Import

typescript
import { Accordion } from "packages/ui/src";

Props

AccordionProps

PropTypeRequired
itemsAccordionItem[]Yes
multiplebooleanNo
defaultOpenstring[]No

Examples

Accordion

Collapsible content sections with single/multi-expand modes, animated chevron, and ARIA accordion pattern. 24th shared component — 12 dedicated tokens.

Interactive Playground

FAQ (Single Expand)

Pipeline Steps (Multi-Expand)

Brain query for requirements and context. Pull existing sources from NotebookLM.

Real-World Use Cases

Settings Panels

Documentation

Metadata

Component Metadata
Familylayout
FrameworksNext.js, Astro/EmDash
DescriptionCollapsible content sections with single or multi-expand modes, animated chevron rotation, dividers between items, and full ARIA accordion pattern. Use for FAQs, settings panels, documentation sections, and pipeline step details.
PropsAccordionProps (items: AccordionItem[], multiple?: boolean, defaultOpen?: string[])
Statescollapsed, expanded, hover, single-mode, multi-mode
A11y
  • Button trigger with aria-expanded
  • aria-controls linking trigger to panel
  • Panel has role=region with aria-labelledby
  • hidden attribute when collapsed
Responsive
  • Full-width on all breakpoints
  • Touch-friendly trigger target
Motion
  • Chevron rotate 180deg transition
  • Background hover transition
Token Dependencies
  • components.accordion.background
  • components.accordion.borderRadius
  • components.accordion.border
  • components.accordion.headerPadding
  • components.accordion.headerColor
  • components.accordion.headerHoverBackground
  • components.accordion.contentPadding
  • components.accordion.contentColor
  • components.accordion.chevronColor
  • components.accordion.chevronActiveColor
  • components.accordion.dividerColor
  • components.accordion.animationDuration
Content Slotsitems[].title (string), items[].content (ReactNode)
CMS Bindings
  • FAQ items from CMS collection
  • Section content from CMS portableText
Test Cases
  • Renders all items
  • Expands on click
  • Collapses previously open in single mode
  • Multiple can be open in multi mode
  • Has aria-expanded
  • Panel has role=region
  • Default open items are expanded
  • Passes className through