0.4.1 • Published 4 years ago

simple-slider-react v0.4.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

simple-slider-react

A simple range slider optimized for numerical applications. Features include:

  • Compatible with React v16
  • min, max, and default values
  • Single file library with no dependency, written in Typescript and compatible with ES6
  • Touch enabled for touchscreen devices
  • Responsive to real-time layout change

How to use

Initialization

<div>
    <SimpleSlider
        min={0}
        max={10}
        inValue={sliderVal}
        onDrag={onDrag}
        onUpdate={onUpdate}
        divs={11}
    />
</div>

handle the update events

const onUpdate = (value: number): void => {
  //do something
};

const onDrag = (value: number): void => {
  //do something
};

Demo

See here

API documentation

Contributions

inspired by noUiSlider

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago