For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
Shadcn Labs/

Accordion

Opening a panel grows its item and the items below glide down. A React component built on View Transitions, installed with the shadcn CLI.

Yes. Cancel from Billing at any time and you keep access until the end of the period you already paid for. Nothing is deleted for 30 days.

Installation

$ pnpm dlx shadcn@latest add @transition-kit/accordion

Usage

import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@/components/transitions/accordion";
<Accordion type="single" collapsible defaultValue="shipping">
  <AccordionItem value="shipping">
    <AccordionTrigger>How long does shipping take?</AccordionTrigger>
    <AccordionContent>Orders ship within two business days.</AccordionContent>
  </AccordionItem>
  <AccordionItem value="returns">
    <AccordionTrigger>Can I return an order?</AccordionTrigger>
    <AccordionContent>Yes, within 30 days of delivery.</AccordionContent>
  </AccordionItem>
</Accordion>

API Reference

Accordion

PropTypeDefaultDescription
type"single" | "multiple"-Single-open or multi-open behavior.
valuestring (single) / string[] (multiple)-Controlled open item(s).
defaultValuestring (single) / string[] (multiple)-Initial open item(s) when uncontrolled.
onValueChange(value: string) => void / (value: string[]) => void-Called with the new open value when items toggle.
collapsibleboolean (single only)falseLets the open item close, leaving none open.

AccordionItem

PropTypeDefaultDescription
valuestring-Unique identifier for the item.
disabledbooleanfalseDisables the item's trigger.