Accordion

Collapsible content sections with animated expand/collapse, supporting single and multiple expand modes.

Installation

npx chilli@latest add accordion

Default

Install the component and import it into your project. The accordion supports both single and multiple expand modes.

Single Expand

Chilli is a design system built for modern web applications with a focus on consistency and developer experience.
Install the component and import it into your project. The accordion supports both single and multiple expand modes.
Yes, all colors and tokens are defined as CSS custom properties that you can override in your project.

Multiple Expand

Only one item can be open at a time. Opening a new item closes the previous one.
Multiple items can be open simultaneously. Each item toggles independently.
An accordion item can also be used standalone without a group, managing its own open state.

API Reference

AccordionGroup

PropTypeDefaultDescription
type"single" | "multiple""single"Whether one or multiple items can be open.
defaultValuestring | string[]Initially open item(s).

AccordionItem

PropTypeDefaultDescription
valuestringUnique identifier when used inside a group.
titlestringThe title text displayed in the header.
defaultOpenbooleanfalseWhether the item is open by default (standalone mode).
childrenReactNodeThe collapsible content.