Skip to content

Accordion

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

Install

Bash
npx @madeui/cli add accordion

Usage

TSX
import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from '@/components/ui/accordion';

Composition

TSX
<Accordion>
  <AccordionItem value="…">
    <AccordionTrigger />
    <AccordionContent />
  </AccordionItem>
</Accordion>

Multiple

Pass multiple to keep several items expanded at the same time.

Yes. Pass `multiple` to keep several items expanded at once.

Yes. Each item tracks its own open state independently.

Disabled

Pass disabled on an AccordionItem to keep it inert.

API reference

Built on Base UI Accordion. All props are forwarded to the underlying Base UI parts (Root, Item, Trigger, Panel); see the Base UI Accordion API reference. Pass multiple={false} for single-open behavior. Every part also accepts a style prop (StyleXStyles, merged last).

AccordionTrigger renders the Base UI Header + Trigger pair with a rotating chevron; AccordionContent wraps the Base UI Panel and animates open using the panel height provided by Base UI.

Was this page helpful?