Slider
Pick a number from a range when shape and proximity matter more than typing a precise value.
Default
Value is a number array. One thumb is [n]. v-model and value are both wired.
50
1
<Slider v-model="value" />
Label
A label plus the live value in tabular nums. Hide the live readout when start or end inputs are on.
40
1
<Slider v-model="volume" label="Volume" />
Range with inputs
Two thumbs. show-start-input and show-end-input add numeric fields that stay in range.
Disabled
Commit on release
value-change fires while dragging. value-committed fires when the pointer or keyboard gesture ends.
Step
Snap to a product increment. min and max should be real limits, not decorative ones.
Best practices
- Use a slider for ranged numbers where closeness matters: volume, opacity, bandwidth caps, color channels. Ports, memory limits, and IDs belong in an Input.
- Always show the live value and name what it is. The track alone is not self-describing.
- Snap with
stepso a drag never lands on47.83291. Clampminandmaxto real product bounds. - Pair the track with numeric inputs when the user may type. Keyboard users will.
- Write expensive work on
value-committed, not on everyvalue-change. - Give the control a name through
labeloraria-label. Leave arrow keys, Page Up/Down, Home, and End to the slider.