2.0.0 • Published 4 years ago

@tmnrp/react-range-slider v2.0.0

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

@tmnrp/react-range-slider

@tmnrp/react-range-slider is a lightweight markup to display input range and legend to display its current value.

Features

  • Render input range slider with configurable legend, initial, min, max, step value
  • Display legend has configurable position.
  • UTC provides 100% coverage on functional as well dom level using Jest and React testing library.

Examples link

https://tmnrp.github.io/react-range-slider-live/

Installation link

$ npm i @tmnrp/react-range-slider

Properties

@tmnrp/react-range-slider is currently extended with the following properties.

PropertiestypeDescription
valueintegerInitial value for the slider to render from.
minintegerMinimum value limit for slider
maxintegerMaximum value limit for slider. Min value overrides if max is less than min.
stepintegerIncrements/Decrements every drag by the step count provided.
sliderThumbShapestringsquare, circle available for thumb shape.
legendbooleanProvide true to display the legend
legendLabelstringLegend prefix for current value.
legendPositionstringtop, right, bottom, left to set the position
legendAlignmentstringstart, end to set the alignment of legend label

Implementation

import RangeSlider from "@tmnrp/react-range-slider";
<RangeSlider
   value={50}
   min={0}
   max={100}
   step={1}
   sliderThumbShape="square"
   legend={true}
   legendLabel="Range: "
   legendPosition="top"
   legendAlignment="end"
/>

Todos

  • More customization on UI/UX
  • Add themes

License

MIT

1.0.1

4 years ago

2.0.0

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago