Create Custom Range Slider in React Native using Reanimated 2
Custom Range Slider Demo
Demo on Android (Left) and Ios (Rigth)
Name | Description | Type | Default Value |
---|---|---|---|
min |
Minimum value of slider | number | Required |
max |
Maximum value of slider | number | Required |
step |
Step of slider | number | Required |
onValueChange |
Will be called when a slider stop | onValueChange={range => {setMinValue(range.min); setMaxValue(range.max);}} | Required |
Clone the project
git clone https://github.com/Rakha112/react-native-custom-range-slider.git
Go to the project directory
cd react-native-custom-range-slider
Install dependencies
npm install
Start the server
npm start -- --reset-cache
Run on IOS
npx pod-install
npx react-native run-ios
Run on ANDROID
npx react-native run-android