@orderandchaos/range-slider
v1.0.1
Published
Wrapper class for initialising range slider with optional log scaling.
Downloads
4
Readme
log-slider
https://sarcoma.github.io/range-slider/
Setup
Example log scaling slider
const handleDemoLogUpdate = (value, log) => {
console.log(value, log);
};
const demoLog = new LogSlider({
id: 'log-scale',
min: 100,
max: 10000,
type: sliderTypes.LOG,
showTab: true,
inputHandler: handleDemoLogUpdate,
changeHandler: handleDemoLogUpdate,
});
<input type="range" id="log-scale"/>
Example linear slider
const handleDemoLinearUpdate = (value) => {
console.log(value);
};
const demoLinear = new LogSlider({
id: 'linear-scale',
min: 1,
max: 1000,
type: sliderTypes.LINEAR,
showTab: true,
inputHandler: handleDemoLinearUpdate,
changeHandler: handleDemoLinearUpdate,
});
<input type="range" id="linear-scale"/>