Creates a slider <input>
element.
Range sliders are useful for quickly selecting numbers from a given range.
The first two parameters, min
and max
, are numbers that set the slider's minimum and maximum.
The third parameter, value
, is optional. It's a number that sets the slider's default value.
The fourth parameter, step
, is also optional. It's a number that sets the spacing between each value in the slider's range. Setting step
to 0 allows the slider to move smoothly from min
to max
.
Examples
Syntax
createSlider(min, max, [value], [step])
Parameters
minimum value of the slider.
maximum value of the slider.
default value of the slider.
size for each step in the slider's range.