Starred repositories
The classic: a heading with a trigger button, one item always shown and the rest folded away. The panel slides open and shut.
One panel that folds away behind a trigger. Minimal by design: the panel slides, and if you ask for it, writes a margin brace beside its text. The chevron indicator turns over the same way the accordion's does.
npx shadcn@latest add @wobko/collapsibleFirst time here? Add the registry to components.json first. How to install
The classic: a heading with a trigger button, one item always shown and the rest folded away. The panel slides open and shut.
`bracket` writes a brace beside the opened text and lets it soak in; `CollapsibleIndicator` is the same chevron as the accordion's and turns over with the panel.
A composed card: the first three lines of a reading list are always there, the rest fold away behind a controlled trigger that says what it will do.
The Radix Collapsible root (also `group/collapsible`, for your own state-dependent classes).
| Prop | Type | Default | Description |
|---|---|---|---|
| open / defaultOpen / onOpenChange | boolean / boolean / (open: boolean) => void | - | Controlled and uncontrolled state. |
| disabled | boolean | false | The trigger stops toggling. |
The panel. It slides open and shut with a height animation that clips the text only while it moves, so a focus ring or ink bleed inside an open panel is never cut (upstream's animated `overflow-hidden` cuts it for good).
| Prop | Type | Default | Description |
|---|---|---|---|
| bracket | "curly" | "square" | false | false | Draw a margin bracket beside the opened content and let the text soak in. Wraps the children in one element. |
The files the CLI copies into your project.
Loading the source