Hextech UI

Collapsible

Live example

Collapsible

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/collapsible.json

API reference

These are the main Collapsible options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
open / defaultOpenbooleanfalse
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.