Accordion

Panels that open with a smooth height animation and a turning plus sign.

no dependenciesMIT · free

Yes. Every component here is free and MIT licensed, for personal and commercial projects.

No. The shadcn CLI copies each component into your project, so you own the code.

Components use shadcn theme tokens like bg-primary and text-muted-foreground, so they follow your theme.

Every animated component respects prefers-reduced-motion.

Installation

npx shadcn@latest add https://ombakui.com/r/accordion.json

Usage

import { Accordion } from "@/components/accordion";

<Accordion items={[{ title: "Is it free?", content: "Yes, MIT licensed." }]} />

Props

PropTypeDefaultDescription
items*AccordionItem[]–The items.
multiplebooleanfalseAllow several items open at once.
defaultOpennumber[][]Indexes open at first.
classNamestring–