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/collapsibleexample
open the run logs with the outline button. enter and space work from the keyboard, and closing hides the panel from the tab order.
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.
- or-412build complete
- or-413review ready
- or-414waiting for a task
- 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.
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
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