Expandable sections whose panels animate their height with a rotating chevron. Single or multiple open.
npx shadcn@latest add https://hyperblur.dev/r/accordion.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/accordion.tsx.
import { Accordion } from "@/components/hyperblur/accordion"
<Accordion items={[{ id: "a", title: "Question", content: "Answer" }]} defaultOpen={["a"]} />| Prop | Type | Default | Description |
|---|---|---|---|
| items | { id: string; title: string; content: ReactNode }[] | required | Sections to render. |
| type | "single" | "multiple" | "single" | Whether opening a section closes the others. |
| defaultOpen | string[] | [] | Ids of sections open on mount. Only the first is used when type is single. |
| collapsible | boolean | true | Allow closing the last open section. When false, one section stays open once opened. |