Getting Started
Foundations
Components
#Installation
npx @dinachi/cli@latest add collapsible#Usage
tsx
import { Collapsible, CollapsibleTrigger, CollapsiblePanel } from '@/components/ui/collapsible'#Examples
Default Collapsible
A basic collapsible section
Controlled Collapsible
Collapsible with controlled open state and status display
State: Closed
#API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | — | The controlled open state of the collapsible |
| defaultOpen | boolean | false | The initial open state when uncontrolled |
| onOpenChange | (open: boolean) => void | — | Callback fired when the open state changes |
| disabled | boolean | false | When true, prevents the user from interacting with the collapsible |