1.0.1 • Published 4 years ago
@orderandchaos/range-slider v1.0.1
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"/>