1. Docs
  2. Components
  3. Accordion

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Installation

Anatomy

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

PropTypeDefault
allowsMultipleExpanded
boolean
defaultExpandedKeys
Iterable<Key>
expandedKeys
Iterable<Key>
onExpandedChange
function
isDisabled
boolean

Accordion.Item

PropTypeDefault
id
Key
isDisabled
boolean
isExpanded
boolean
defaultExpanded
boolean
onExpandedChange
function

Accordion.Trigger

PropTypeDefault
isDisabled
boolean
children
ReactNode

Accordion.Content

PropTypeDefault
children
ReactNode