Accordion
Disclosure sections with animated height. Single or multiple open.
Install this component
Install command hidden until you are signed in with a license.
Live demo
Animated icons, components and packs.
Yes, in unlimited projects.
Keyboard operable and reduced-motion aware.
Props
| Prop | Type | Description |
|---|---|---|
| items | { id; title; content }[] | Sections to render. |
| multiple | booleandefault false | Allow several sections open at once. |
| defaultOpen | string[]default [] | Ids open initially. |
| headingLevel | 2 | 3 | 4default 3 | Heading level wrapping each trigger. |
Accessibility
Keyboard
- TabMove between triggers
- Enter / SpaceToggle the focused section
ARIA and semantics
- Each trigger is a button inside a heading
- aria-expanded and aria-controls link trigger and panel
- Panels use role=region labelled by their trigger
Source
Copy the files into your project. Or install with the commands above (they unlock with your license).
The full Accordion source is part of the license.
The live demo is free to try. A license unlocks copy-paste source, installs and exports for every component and pack.
Unlock every icon