- Docs
- Components
- Accordion
Accordion
A vertically stacked set of interactive headings that each reveal a section of content.
Preview
Code
Installation
CLI
Manual
Anatomy
Single import
Multiple imports
Animation
The accordion uses the --disclosure-panel-height CSS variable to animate the height of the content area.
Customization
If you need to customize the internal padding of the accordion content, you can use the *: Tailwind variant to target the content area directly.
API Reference
Accordion.Root
| Prop | Type | Default |
|---|---|---|
allowsMultipleExpanded | boolean | |
defaultExpandedKeys | Iterable<Key> | |
expandedKeys | Iterable<Key> | |
onExpandedChange | function | |
isDisabled | boolean |
Accordion.Item
| Prop | Type | Default |
|---|---|---|
id | Key | |
isDisabled | boolean | |
isExpanded | boolean | |
defaultExpanded | boolean | |
onExpandedChange | function |
Accordion.Trigger
| Prop | Type | Default |
|---|---|---|
isDisabled | boolean | |
children | ReactNode |
Accordion.Content
| Prop | Type | Default |
|---|---|---|
children | ReactNode |