Skip to Content
Layout & Disclosure@hacline/ui/collapsible

Collapsible

Expand or collapse a single content panel with a trigger button.

Usage

Place CollapsibleTrigger and CollapsiblePanel inside the same root component. Use open and onOpenChange when you need controlled state.

Controlling the Panel Externally

Manage the open state with open and onOpenChange so both the panel trigger and external buttons can update it.

build completed in 2.1s

Parts

PartDescription
CollapsiblePanel
The content the trigger shows and hides. Closed, it leaves the page unless keepMounted or hiddenUntilFound keeps it.
CollapsibleTrigger
The button that opens and closes the panel. It says whether the panel is open with aria-expanded.

Props

Prop

Type

View UI SDK parts and state attributes.