skip to the page
superthread
componentscollapsible
system
superthread
version
2.15.1
date
24.11.26

collapsible

one disclosure with a trigger and a panel. this pass-through item keeps the upstream behavior, turns a chevron at the trigger's end while open, and lets the caller choose the trigger and layout.

bunx --bun shadcn@latest add @mk/collapsible

example

open the run logs with the outline button. enter and space work from the keyboard, and closing hides the panel from the tab order.

light

dark

open

start with the panel expanded. the chevron at the trigger's end points up while it is open, and the same trigger closes it again; the content remains in the normal page flow.

light

  • or-412build complete
  • or-413review ready
  • or-414waiting for a task

dark

  • or-412build complete
  • or-413review ready
  • or-414waiting for a task

states

the caller supplies an outline button here, so hover, pressed and focus come from that button. the root owns open and disabled.

light

closed
trigger uses the caller's button

3 logs available.

open
panel follows, chevron turns

hover
trigger uses the caller's button

focus
button's outside ring

pressed
trigger uses the caller's button

disabled
disclosure cannot open

dark

closed
trigger uses the caller's button

3 logs available.

open
panel follows, chevron turns

hover
trigger uses the caller's button

focus
button's outside ring

pressed
trigger uses the caller's button

disabled
disclosure cannot open