GitHub

Collapsible

A collapsible component for displaying content in a vertical stack.

Total visits
22.3%10.1%6.8%1.4%

Installation

Usage

Examples

Nested

You can nest collapsibles inside each other to create hierarchical structures.

Getting started
We'll help you get started

Disabled

Use the disabled prop on the collapsible to disable it.

Controlled

Use the open and onOpenChange props to control the collapsible state programmatically.

State: closed

Partial Collapse

Use the collapsedHeight prop to show a portion of the content when collapsed.

Accessibility Notice

Interactive elements (links, buttons, inputs) within the collapsed area automatically become inaccesible to prevent keyboard navigation to hidden content.

API Reference

Collapsible

Root element of the collapsible. Renders a div

CollapsibleTrigger

Button that toggles the collapsible. Renders a button

CollapsibleContent

Container for the collapsible content. Renders a div

CollapsibleIndicator

Indicator icon that rotates when the collapsible is open. Renders a span


For a complete list of props, see the Ark UI documentation.