Accordion

Compound disclosure group supporting single or multiple open panels.

Add it to your project

Eject the complete accordion group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject accordion
app.tsx
import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from '@/components/toucan/accordion';

Use when

Several related content sections benefit from progressive disclosure.

Avoid when

All content is short enough to scan at once or must be compared side by side.

Example

Token-driven design system with accessible primitives, compound components, and theme support.

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

AccordionAccordionItemAccordionPanelAccordionTrigger

Accordion

Props type: AccordionProps

NameTypeDefaultRequiredDescription
collapsiblebooleantrueNoAllow the final open item to close in a single-value accordion.
defaultValuestring | string[]undefinedNoInitial value when the component is uncontrolled.
onChange(value: string | string[]) => voidundefinedNoCalled when the value changes.
type"single" | "multiple"'single'NoBehavior or visual type for the component.
valuestring | string[]undefinedNoControlled value.

Also accepts the native div attributes that are not replaced by a Toucan prop.

AccordionItem

Props type: AccordionItemProps

NameTypeDefaultRequiredDescription
disabledbooleanfalseNoPrevents interaction when true.
valuestring—RequiredControlled value.

Also accepts the native div attributes that are not replaced by a Toucan prop.

AccordionPanel

Props type: AccordionPanelProps

No Toucan-specific props.

Also accepts the native div attributes that are not replaced by a Toucan prop.

AccordionTrigger

Props type: AccordionTriggerProps

No Toucan-specific props.

Also accepts the native button attributes that are not replaced by a Toucan prop.

Type exports

AccordionItemProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps

Accessibility

  • Triggers are buttons with expanded state and panel relationships.
  • Disabled items remain non-interactive.

Token families

accordion

Related components