Overview
Accordion organizes content into collapsible sections, reducing cognitive load by hiding detail until needed. It supports single (only one open at a time) and multiple (many can be open) expansion modes.
Installation
Usage
Variants
Single Mode (Default)
Only one item can be open at a time. Usecollapsible to allow closing the active item.
Multiple Mode
Multiple items can be open simultaneously.API Reference
Accordion
Expansion mode. Values:
single · multipleControlled open item(s). String for
single, string array for multiple.Callback fired when the open state changes.
Uncontrolled default open item(s).
When
true, allows closing the active item in single mode by clicking it again.Additional Tailwind classes for custom overrides.
AccordionItem
Unique identifier for this item (required).
Disables this item — it cannot be opened or closed.
Accessibility
- Accordion follows the WAI-ARIA Accordion pattern with
role="button"on triggers - Triggers toggle
aria-expandedbetweentrueandfalse - Content panels use
role="region"andaria-labelledbypointing to their trigger - Enter/Space opens or closes the focused item
- Up/Down arrow keys move focus between triggers
Do’s & Don’ts
Do
- Use Accordion for FAQ sections, settings groups, and structured reference content
- Use
type="single"for step-by-step guides where one step is active - Use
type="multiple"for reference content users may want to compare - Keep trigger labels short — one clear phrase per item
Don't
- Don’t use Accordion to hide critical information users always need
- Don’t nest accordions inside accordion content — it creates confusion
- Don’t use Accordion as a replacement for Tabs
- Don’t put primary CTAs inside accordion panels — they are easily missed