Playground
Allow multiple open
Single Item Open (Default)
Allow Multiple Open
Pre-expanded via defaultOpenIds
Yes, you can cancel your subscription from your billing console instantly. Your services will continue running until the end of the current billing cycle.
The "Can I cancel..." item starts open, without needing controlled state — useful for surfacing the one FAQ most relevant to how the user got here.
Disabled Items
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items | AccordionItem[] | — | List of items with id, title, and rich content to collapse/expand. |
| allowMultiple | boolean | false | Allows multiple sections to remain open concurrently instead of auto-collapsing previous ones. |
| defaultOpenIds | string[] | [] | Pre-expand these item ids on mount — no controlled state required. |
| className | string | "" | Additional CSS classes to apply to the accordion wrapper. |
Usage Guidelines
When to use
- Use when content is optional or secondary and hiding it by default reduces cognitive load — FAQs, advanced settings, long supplementary details.
- Use when only one section usually needs focus at a time (the default, single-open behavior).
When not to use
- Don't hide primary or required content behind an Accordion — if users must see it, show it open by default instead.
- Don't nest an Accordion inside another Accordion — flatten the hierarchy or use Tabs for the outer level instead.