GitHub 560+

Accordion

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

Yes. It adheres to the WAI-ARIA design pattern.
Yes. It comes with default styles that matches the other components' aesthetic.
Yes. It's animated by default, but you can disable it if you prefer.

Installation

npx shadcn@latest add @fulldev/accordion

Usage

import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@/components/ui/accordion"
<Accordion>
  <AccordionItem value="item-1">
    <AccordionTrigger>Is it accessible?</AccordionTrigger>
    <AccordionContent>
      Yes. It adheres to the WAI-ARIA design pattern.
    </AccordionContent>
  </AccordionItem>
</Accordion>

Composition

Use the following composition to build an Accordion:

Accordion
├── AccordionItem
│   ├── AccordionTrigger
│   └── AccordionContent
└── AccordionItem
    ├── AccordionTrigger
    └── AccordionContent

Examples

Multiple

Use the multiple prop to allow multiple items to be open at the same time.

Manage your profile, billing details, and email preferences.
Update your password, passkeys, and sign-in methods.
Choose which product updates and alerts you want to receive.

With Disabled

Use the disabled prop on AccordionItem to disable individual items.

This item can be opened and closed normally.
This panel stays unavailable to keyboard and pointer interaction.
You can still interact with the other items in the list.

With Borders

Add border to the Accordion and border-b last:border-b-0 to the AccordionItem to add borders to the items.

Keep styles, spacing, and behavior consistent across your UI.
Ensure controls are readable and keyboard friendly.
Only reveal the content people need when they need it.

In Card

Wrap the Accordion in a Card component.

FAQ
Yes. Support is included for all active subscriptions.
Yes. You can cancel your subscription whenever you want.
A trial is available for eligible plans and new accounts.

API Reference

See the GitHub source code for more information on props. See the data-slot docs for more information on interactivity.