Skip to main content
The Accordion component allows users to show and hide sections of related content on a page. It uses a composable API with separate components for root, item, trigger, and content.

Usage

Multiple items open

API reference

Accordion (Root)

The root container component for the accordion.
boolean
default:"false"
Whether multiple items can be open at the same time.
string | string[]
The controlled value of the accordion. Use string for single mode, string array for multiple mode.
string | string[]
The default value when uncontrolled. Use string for single mode, string array for multiple mode.
(value?: string | string[]) => void
Callback fired when the accordion value changes. Receives string for single mode, string array for multiple mode.
string
Additional CSS class for the accordion root.

Accordion.Item

An individual accordion item.
string
required
A unique value for the item.
string
Additional CSS class for the accordion item.
boolean
Whether the accordion item is disabled.

Accordion.Trigger

The button that toggles the accordion item.
string
Additional CSS class for the trigger.
ReactNode
The content of the trigger button.

Accordion.Content

The collapsible content area.
string
Additional CSS class for the content wrapper.
ReactNode
The content to display when expanded.