Skip to content
Components

Collapsible

Accessible disclosure primitive with measured open and close motion.

Composition

Anatomy

  • <Collapsible>
    • <CollapsibleTrigger />
    • <CollapsibleContent />
    </Collapsible>

Installation

The Control UI source installs this component from src/registry/sources/control-ui/ui/collapsible.tsx.

Registry command
See registry manifest

Raw code

Primary installed source

src/registry/sources/control-ui/ui/collapsible.tsx

Knobs

Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.

--cui-collapsible-* · 7 knobsHow the cascade resolves
--cui-collapsible-trigger-radius<length-percentage>var(--radius-control)
--cui-collapsible-trigger-hover-background<color>var(--hover-fill)
--cui-collapsible-trigger-padding-inline<length-percentage>calc(var(--spacing) * 2)
--cui-collapsible-trigger-padding-block<length-percentage>0px
--cui-collapsible-trigger-font-size<length-percentage>var(--text-label)
--cui-collapsible-trigger-foreground<color>var(--foreground)
--cui-collapsible-trigger-hover-foreground<color>var(--foreground)