Single or dual thumb, marks, tooltips, vertical, and real form participation — zero dependencies, full keyboard and screen-reader support. Drag anything below.
Drag the thumb, or press the track to jump. Arrow keys work too.
new Slider('#basic', {
value: 40, suffix: '%',
onInput: v => show(v)
})
Dual thumb with $ formatting and always-on bubbles.
Thumbs clamp at each other.
new Slider('#price', {
min: 0, max: 1000, step: 10,
value: [200, 650],
prefix: '$', tooltip: 'always'
})
Snaps to the step grid; labeled marks under the rail.
new Slider('#ram', {
min: 0, max: 64, step: 16, value: 16,
marks: { 0:'0', 16:'16', 32:'32', 48:'48', 64:'64 GB' },
format: v => v + ' GB'
})
vertical: true — bottom to top; ArrowUp still increases.
new Slider('#vol', { value: 65, vertical: true })
new Slider('#temp', { min: -10, max: 40, value: 20,
vertical: true, suffix: '°C', tooltip: 'always' })
The <input> is hidden and kept synced — submit
posts real values (dual adds budget[] hidden inputs).
new Slider(document.getElementById('native-volume'))
new Slider('#budget', { name: 'budget', prefix: '$',
max: 500, value: [100, 350] })
disabled: true, toggled live via
enable()/disable().
var s = new Slider('#locked',
{ value: 70, disabled: true })
s.enable(); s.disable()