logo

Collapsible

An interactive component which expands/collapses a panel.

The new release adds smart defaults, improved a11y states, and tighter spacing for dense layouts.
Source-ready React + Tailwind components, theme tokens, and a matching documentation system.

Usage

Loading...

Controlled state

Use the open and onOpenChange props when the state is managed externally.

Sync status: Collapsed
Choose which workspaces to sync, schedule background updates, and keep offline access enabled.
Loading...

API Reference

The Collapsible component renders a div that manages disclosure state.

PropTypeDefaultDescription
openbooleanundefinedControls the open state when provided.
defaultOpenbooleanfalseSets the initial open state for uncontrolled usage.
onOpenChange(open: boolean) => voidundefinedCalled when the open state changes.
disabledbooleanfalsePrevents toggling and reduces opacity.
classNamestringundefinedAdd custom classes to the root.

The CollapsibleTrigger component renders a button linked to the content region.

PropTypeDefaultDescription
showIconbooleantrueToggles the chevron icon.
iconReact.ReactNodeundefinedCustom icon node for the trigger.
classNamestringundefinedAdd custom classes to the trigger.

The CollapsibleContent component renders the collapsible panel body.

PropTypeDefaultDescription
classNamestringundefinedAdd custom classes to the content container.