pnpm dlx shadcn@latest add https://ui.saturation.io/r/accordion.jsonTailwind v4 — Source Scanning
Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:
@source "../components";This ensures all utility classes in CVA variants and data attribute selectors are included in your build.
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"<Accordion type="single" collapsible>
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>
Yes. It adheres to the WAI-ARIA design pattern.
</AccordionContent>
</AccordionItem>
</Accordion>| Prop | Type | Default | Description |
|---|---|---|---|
type | "single" | "multiple" | "single" | Whether one or multiple items can be opened. |
collapsible | boolean | false | When type is single, allows closing content. |
defaultValue | string | string[] | — | The default expanded item(s). |
value | string | string[] | — | The controlled expanded item(s). |
onValueChange | (value: string | string[]) => void | — | Event handler for state changes. |
| Prop | Type | Default | Description |
|---|---|---|---|
value* | string | — | A unique value for the item. |
disabled | boolean | false | Disables interaction with this item. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | The trigger button content. |
asChild | boolean | false | Render as child element. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | The content to reveal. |
forceMount | boolean | — | Force mount for animation control. |
Built on Radix UI, which adheres to the WAI-ARIA Pattern.
| Key | Description |
|---|---|
Space | Toggles the collapsed state. |
Enter | Toggles the collapsed state. |
ArrowDown | Moves focus to the next trigger. |
ArrowUp | Moves focus to the previous trigger. |
Home | Moves focus to the first trigger. |
End | Moves focus to the last trigger. |