skip to the page
superthread
componentstoggle group
system
superthread
version
2.15.1
date
24.11.26

toggle group

toggles that share a choice and, by default, a 1 px edge. the pressed item keeps all four foreground edges visible.

bunx --bun shadcn@latest add @mk/toggle-group

example

choose one time view, or combine ship filters. arrow keys move between items; space changes the focused item.

light

orbit shows the day. arrow keys move between items.

ship filters allow more than one selection.

dark

orbit shows the day. arrow keys move between items.

ship filters allow more than one selection.

variants

default and outline keep the standalone toggle looks. the group supplies the same variant to each item.

light

default
shared edge, pressed edge and tick

outline
shared edge, pressed edge and tick

dark

default
shared edge, pressed edge and tick

outline
shared edge, pressed edge and tick

sizes

the group supplies the small, default or large height to all its items.

light

sm
32 px high

default
40 px high

lg
48 px high

dark

sm
32 px high

default
40 px high

lg
48 px high

layout

spacing 0 joins the edges and puts focus inside. positive spacing separates the items and restores the outside ring. vertical groups join along their horizontal edges.

light

joined
spacing 0, shared 1 px edge

separate
spacing 3, 12 px between items

vertical
shared horizontal edges

dark

joined
spacing 0, shared 1 px edge

separate
spacing 3, 12 px between items

vertical
shared horizontal edges

states

the selected edge rises above its neighbour. hover fills the other item, joined focus draws inside it, and disabled dims the labels.

light

rest and pressed
current edge rises above its neighbour

hover
control hover fill

focus, joined
house ring inside the item

invalid
error edge on the unselected item

disabled
dim labels, faint stock

dark

rest and pressed
current edge rises above its neighbour

hover
control hover fill

focus, joined
house ring inside the item

invalid
error edge on the unselected item

disabled
dim labels, faint stock