Skip to content

Collapsible

Single disclosure — trigger that toggles an animated content panel.

Installation

npx nimbus-docs add collapsible

Preview

Anything — text, code, components. The container animates open and closed.

<Collapsible>
<CollapsibleTrigger>What's inside?</CollapsibleTrigger>
<CollapsibleContent>
  Anything — text, code, components. The container animates open and closed.
</CollapsibleContent>
</Collapsible>

Examples

Default open

Pass open to start in the expanded state.

The panel is visible on first render.

<Collapsible open>
<CollapsibleTrigger>Already open</CollapsibleTrigger>
<CollapsibleContent>The panel is visible on first render.</CollapsibleContent>
</Collapsible>

API reference

Every prop the component accepts, sourced from a single declaration.

Prop Type
open
boolean
Components

Type to search…

↑↓ navigate ↵ select Esc close