Collapsible
A single panel toggled by a button. Unlike Accordion it stands alone — ideal for inline FAQ entries, code blocks, or side panels. Animates via --collapsible-panel-height.
Collapsible
base-ui docs ↗A single panel toggled by a button. Unlike Accordion it stands alone —
ideal for inline FAQ entries, code blocks, or side panels.
Animates via --collapsible-panel-height.
| Prop | Type | Default |
|---|---|---|
| trigger* | ReactNode | — |
Content rendered inside the toggle button. | ||
| children* | ReactNode | — |
Content revealed when expanded. | ||
| defaultOpen | boolean | — |
Whether the panel is initially open (uncontrolled). | ||
| open | boolean | — |
Controlled open state. | ||
| onOpenChange | ((open: boolean) => void) | — |
Called when the panel opens or closes. | ||
| disabled | boolean | — |
Prevent the panel from being toggled. | ||
| className | string | — |
Styled Parts
base-ui docs ↗Pre-styled wrappers around the corresponding base-ui parts. All base-ui props are forwarded.
CSS Class Names
Available as keys on the CollapsibleStyles object. Each key maps to a hashed CSS module class name at runtime.
panelpanel-contentroottriggertrigger-icon