slider
a flat foreground range inside an 8 px ruled track. square thumbs set one value or the two ends of a range.
bunx --bun shadcn@latest add @mk/sliderexample
set how many workers an orbit run can use. drag the thumb or use the arrow keys; home and end reach the limits.
4 workers. use the arrow keys to adjust.
4 workers. use the arrow keys to adjust.
variants
one value gives one thumb. an array gives one per bound, and a vertical track keeps the same dimensions.
single
one value, one thumb
range
two bounds, two thumbs
vertical
same track and thumb dimensions
single
one value, one thumb
range
two bounds, two thumbs
vertical
same track and thumb dimensions
states
the 16 px thumb takes the control hover fill on hover and while dragging. keyboard focus draws the house ring outside it. at either limit, the thumb stays inside the track.
rest
8 px track, 16 px thumb
hover
control hover thumb
focus
outside house ring
dragging
control hover thumb
minimum
thumb stays inside
maximum
flat foreground range
disabled
disabled edge and range
rest
8 px track, 16 px thumb
hover
control hover thumb
focus
outside house ring
dragging
control hover thumb
minimum
thumb stays inside
maximum
flat foreground range
disabled
disabled edge and range