ComponentClient component

Accordion

Vertically stacked disclosure sections with fluid, accessible motion.

Installation

Preview

Preview style

Every component is installed directly into your project, so you can reshape every detail.

Usage

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

<Accordion collapsible type="single">
  <AccordionItem value="item-1">
    <AccordionTrigger>Is the source editable?</AccordionTrigger>
    <AccordionContent>Every detail is yours to change.</AccordionContent>
  </AccordionItem>
</Accordion>

API reference

PropTypeDefaultDescription
type"single" | "multiple"Controls whether one or several items can be open.
collapsiblebooleanfalseAllows the active single item to be closed.
classNamestringOverrides or extends the generated Tailwind classes.
disabledbooleanfalsePrevents user interaction when supported.