Skip to main content
The Collapsible component allows content to be expanded and collapsed with smooth animations.

Installation

Usage

Components

Collapsible (Root)

boolean
Controlled open state.
boolean
Default open state.
function
Callback when state changes.
boolean
Disable the collapsible.

CollapsibleTrigger

string
Additional CSS classes.
The trigger button to toggle the panel. Includes a chevron icon that rotates when open.

CollapsiblePanel

boolean
default:"false"
Keep panel mounted when closed.
boolean
default:"false"
Use hidden=until-found attribute.

Examples

Basic Collapsible

Controlled

Default Open

Accessibility

  • Built on @base-ui/react for accessibility
  • Keyboard accessible (Enter/Space to toggle)
  • Proper ARIA attributes
  • Smooth height transitions
  • Focus management