Accordion
A vertically stacked set of interactive headings that each reveal a section of content.
disclosureinteractive
Loading preview...
Installation
npx baseui-cn add accordionUsage
import {
Accordion,
AccordionItem,
AccordionPanel,
AccordionTrigger,
} from "@/components/ui/accordion"
<Accordion defaultValue={["item-1"]}>
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionPanel>
Yes. Built on Base UI with full ARIA and keyboard support.
</AccordionPanel>
</AccordionItem>
</Accordion>
Examples
Basic
A single-open accordion. The first item is open by default.
Loading preview...
Multiple
Use the multiple prop to allow multiple items open at once.
Loading preview...
Disabled
Use the disabled prop on AccordionItem to disable individual items.
Loading preview...
API Reference
See the Base UI Accordion documentation for the full API reference, including all props, data attributes, and CSS classes.