1.0.2 • Published 3 years ago

react-native-range-seekbar v1.0.2

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

react-native-range-seekbar

React Native component used to select range of values.

Installation

npm install --save react-native-range-seekbaroryarn add react-native-range-seekbar

Props

PropTypeRequiredDefaultDescription
activeLineHeightnumberNO7Width of the line indicating the range that has been selected.
activeLineStyleViewStyleNOColor of the line indicating the range that has been selected.
inactiveLineStyleViewStyleNOColor of the area that has been excluded from the range.
pointWidthnumberNO15Width of the point.
pointStyleViewStyleNOStyles applied to the point.
minValuenumberYESMinimum value to select.
maxValuenumberYESMaximum value to select.
onValueChangefunctionYESMethod that will be executed after value change. The method should take as a parameter a tuple of two numbers.
onPressStartfunctionNOMethod that will be executed after press in on a point.
onPressEndfunctionNOMethod that will be executed after press out a point.
stepnumberNO PROPS NOT YET AVAILABLE. A step that OnValueChange will be executed. For now, the value is set on 1.

Known issues

On iOS, with react-navigation, when a point is near the left edge of the screen, trying to move it may trigger gestures, e.g. returning to the previous screen. The solution is to use the onPressStart and onPressEnd methods to disable the gestures for the view while moving the point.

TODO

  • Add property step
  • Add the ability to set own point
  • Add a new different type of behavior when minimal and maximal values are equal. For now, in that situation, the points are spreading to the corners.