button group
related actions on shared 1 px edges. the children keep their own button states and keyboard focus.
bunx --bun shadcn@latest add @mk/button-groupexample
add an orbit run to the queue, then start it. the text addon follows the count; start becomes unavailable when the queue is empty.
3 runs in the orbit queue
3 runs in the orbit queue
parts
a text addon prints at the default button height. a separator stretches along the row, and nested groups keep a gap between their action sets.
text addon
40 px, secondary stock
separator
input ink, stretched to the row
nested groups
8 px between the groups
text addon
40 px, secondary stock
separator
input ink, stretched to the row
nested groups
8 px between the groups
orientation
horizontal joins vertical edges. vertical joins horizontal edges. each child remains a separate action in the tab order.
horizontal
neighbours share a 1 px edge
vertical
neighbours share a 1 px edge
horizontal
neighbours share a 1 px edge
vertical
neighbours share a 1 px edge
states
each child draws its own hover, press and disabled state. the focused child rises above its neighbour so its outside ring stays visible.
rest
child buttons keep their edges
hover
child control hover fill
focus
focused child rises above its neighbour
pressed
child control press fill
disabled
child disabled edge screen
rest
child buttons keep their edges
hover
child control hover fill
focus
focused child rises above its neighbour
pressed
child control press fill
disabled
child disabled edge screen