Design System
Navigation

Collapsible

A single show/hide disclosure. Use it for one optional region; for a set of them use Accordion.

Purpose

Use a Collapsible to tuck one optional region behind a trigger — advanced filters, secondary detail, a long note — so the common path stays uncluttered. It is the single-disclosure primitive: for a stack of sections use Accordion, which adds the exclusive-open behaviour and its own styling.

Collapsible ships completely unstyled. It contributes the open/closed mechanics and the ARIA wiring; the trigger is whatever you compose — usually a Button via asChild.

Disclosure

Collapsed by default; the trigger toggles it.

States

Two states: closed (the default) and open. Start open with defaultOpen when the content is usually wanted — for instance notes already attached to the record.

Member submitted a duplicate receipt; original approved on 21 July 2026.

Control it yourself when something else needs to react to the state — for example swapping the chevron:

Controlled, with a chevron that follows the state
const [open, setOpen] = React.useState(false);

<Collapsible open={open} onOpenChange={setOpen}>
  <CollapsibleTrigger asChild>
    <Button variant="outline">
      Advanced filters
      <Glyph symbol={open ? "expand_less" : "expand_more"} size={18} />
    </Button>
  </CollapsibleTrigger>
  <CollapsibleContent>…</CollapsibleContent>
</Collapsible>

Structure

Collapsible has no tokens of its own — it renders no visual styling. What it does provide:

PartWhat you get
CollapsibleState container; open / defaultOpen / onOpenChange / disabled
CollapsibleTriggerA button (compose your own with asChild); toggles on activation
CollapsibleContentRemoved from the DOM while closed (unless forceMount)
Styling hookdata-state="open" / "closed" on all three parts

Best practices

Do

  • Label the trigger with what it reveals — "Advanced filters", not "More".
  • Signal the state on the trigger, e.g. a chevron that flips with data-state or controlled state.
  • Keep the default collapsed when the content is genuinely optional.
  • Use defaultOpen when most visits need the content — do not make people earn it.

Don't

  • Hide required form fields inside one — validation errors in a closed region go unseen.
  • Stack several Collapsibles to fake an Accordion — use the real one.
  • Put the page's primary content behind a disclosure.
  • Nest disclosures more than one level deep.

Accessibility & keyboard

  • The trigger carries aria-expanded and aria-controls, wired by Radix — screen readers hear the state without any extra work.
  • Closed content is removed from the DOM, so nothing hidden is tab-reachable or announced.
  • Keyboard: Tab to the trigger; Enter or Space toggles.
  • A disabled root disables the trigger; it stays visible at 50% opacity via your composed button.

Props

All three parts are re-exports of the Radix Collapsible primitives, unmodified — Collapsible takes open, defaultOpen, onOpenChange and disabled; the trigger and content take asChild plus native attributes. There is no separate props interface to document.

Every Collapsible part and prop in Storybook

On this page