Layout
Collapsible
Toggles the visibility of secondary content with animated height transitions.
Usage
Anatomy
The parts and how they nest, taken from the preview above.
Examples
Default disclosure
Uncontrolled disclosure panel for secondary configuration details.
Controlled disclosure
Coordinates disclosure state through external state and event handlers.
Disabled state
Suppresses user interaction and preserves the closed panel state.
Long wrapping content
Preserves layout structure and text wrapping across responsive viewports.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Name the content being revealed and keep the trigger visible after expansion. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Accordion for related disclosure sections. Do not hide required input or critical errors. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Controls open state of the collapsible disclosure. |
| | false | Sets initial open state for uncontrolled disclosure. |
| | — | Callback invoked when the open state changes. |
| | false | Prevents user interaction and suppresses disclosure toggling. |
| | "div" | Root disclosure container that coordinates open state with a default div host. |
| | "button" | Interactive trigger button with managed aria-expanded; supports render and nativeButton. |
| | "div" | Animated disclosure panel with measured transitions; supports keepMounted and hiddenUntilFound. Place spacing on an inner container. |
| | — | Low-level Base UI primitive escape hatch for custom composition. |