@orderandchaos/range-slider

1.0.1 • Public • Published

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"/>

Readme

Keywords

Package Sidebar

Install

npm i @orderandchaos/range-slider

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

18 kB

Total Files

5

Last publish

Collaborators

  • sarcoma