Skip to content
PixiKit

Band Slider

A range slider whose track is split into bands, each an equal share; the active band is filled. Works with keys and right to left.

pixikit.com/docs/components/band-slider

Customize

Default value12
Min1
Max50
Step
Show labels
Accent color
Width520px
Track height10px
Font size14px

Props

14
NameTypeDefaultDescription
valuenumberNoneThe value, for a controlled slider.
defaultValuenumber12The starting value when uncontrolled, kept between min and max.
onValueChange(value: number) => voidNoneCalled with each new value.
minnumber1The lowest value.
maxnumber50The highest value.
stepnumber1The distance between values.
bandsSliderBand[]BANDSThe bands, in order. Each gets an equal share of the track and is linear inside it.
showLabelsbooleantrueA row under the track naming each band, the active one filled.
accentColorstring"#7c3aed"The active band's fill, the thumb and the active label.
ariaLabelstring"Value"What screen readers announce for the slider.
widthnumber520The widest it gets, in pixels; it shrinks to fit a narrow container.
trackHeightnumber10The track's thickness in pixels; the thumb grows with it.
fontSizenumber14The size of the band labels, in pixels.
classNamestringNone

Related