Collapsible
Live example
Collapsible
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/collapsible.jsonAPI reference
These are the main Collapsible options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
open / defaultOpen | boolean | false |
onOpenChange | (open, details) => void | — |
Expanded state
Use open with onOpenChange to control expansion, or defaultOpen for local state. Keep the trigger visible and label it by the content it reveals. A collapsible does not replace dialog focus management.