1.0.1 • Published 6 years ago

@lighthouseapps/react-native-range-slider v1.0.1

Weekly downloads
3
License
MIT
Repository
gitlab
Last release
6 years ago

react-native-range-slider

React Native Range Slider for Android and iOS

Getting started

$ npm i @lighthouseapps/react-native-range-slider --save $ react-native link @lighthouseapps/react-native-range-slider

Usage

import RangeSlider from '@lighthouseapps/react-native-range-slider';

<RangeSlider {PROPERTIES} />

Properties

PropertyDescriptionTypeDefault Value
onValueChangedA callback to be called when value was changed.(lowValue, highValue, fromUser) => {}fromUser parameter is true if the value was changed because of user's interaction (not by setting lowValue or highValue properties). Just like android's OnSeekbarChangeListener.Function4
rangeEnabledSlider works as an ordinary slider with 1 control if falseBooleantrue
lineWidthWidth of slider's lineNumber4
thumbRadiusRadius of thumb (including border)Number10
thumbBorderWidthBorder width of thumbNumber2
textSizeSize of label textNumber16
labelBorderWidthBorder width of labelNumber2
labelPaddingPadding of label (distance between border and text)Number4
labelBorderRadiusBorder radius of label bubbleNumber4
labelTailHeightHeight of label bubble's tailNumber8
labelGapHeightGap between label and sliderNumber4
textFormatThis string will be formatted with active value and shown in thumbString"Price: %d" =>"Price: 75"if the current value is 75%d (just the number)
labelStyleStyle of the label.Label is not shown if noneStringCurrently supported values:- none- bubblebubble
gravityVertical gravity of drawn contentStringCurrently supported values:- top- bottom- centertop
selectionColorColor of selected partString(#RRGGBB or #AARRGGBB)#4286f4
blankColorColor of unselected partString(#RRGGBB or #AARRGGBB)#7fffffff
thumbColorColor of thumbString(#RRGGBB or #AARRGGBB)#ffffff
thumbBorderColorColor of thumb's borderString(#RRGGBB or #AARRGGBB)#cccccc
labelBackgroundColorColor label's backgroundString(#RRGGBB or #AARRGGBB)#ff60ad
labelBorderColorColor label's borderString(#RRGGBB or #AARRGGBB)#d13e85
labelTextColorColor label's textString(#RRGGBB or #AARRGGBB)#ffffff
minMinimum value of sliderNumber (integer)0
maxMaximum value of sliderNumber (integer)100
stepStep of sliderNumber (integer)1
lowValueCurrent value of lower thumbNumber (integer)0
highValueCurrent value of higher thumbNumber (integer)100
1.0.1

6 years ago

1.0.0

6 years ago