Accordion

Disclosure sections like Finder's Get Info window, with triangles that turn as they open.

@cupertinoui/accordionBase UI Accordion Registry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/accordion

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"

<Accordion defaultValue={["general"]}>
  <AccordionItem value="general">
    <AccordionTrigger>General</AccordionTrigger>
    <AccordionContent>…</AccordionContent>
  </AccordionItem>
</Accordion>

API Reference

Every part forwards the props of the underlying Base UI Accordion part. The props below are the ones CupertinoUI adds or changes.

Accordion

PropTypeDescription
value / defaultValuestring[]The open sections.
multipleboolean
Default: false
Lets several sections be open.
classNamestringExtra classes, merged with the component's own.