About the shadcn/ui Accordion Component

The Accordion component is part of shadcn/ui — a collection of accessible, copy-paste React components built with Radix UI and Tailwind CSS. Install it with `npx shadcn@latest add accordion` and copy it directly into your project.

Accordion Component — Frequently Asked Questions

How do I open multiple accordion items at once?

Set `type="multiple"` on `<Accordion>` and use an array for `value`. With `type="single"`, only one panel can be open at a time.

How do I control an accordion programmatically?

Use `value` and `onValueChange` props: `<Accordion type="single" value={open} onValueChange={setOpen}>`. The value is the AccordionItem's `value` prop.

Can I disable individual accordion items?

Yes, add `disabled` to `<AccordionItem>`: `<AccordionItem value="item-1" disabled>`. The trigger will appear dimmed and won't respond to clicks.

Accordion Component - shadcn/ui Examples | Shadcn Store