@kumar_01/react-native-slider
v1.0.0
Published
A fully customizable and responsive slider component for React Native.
Downloads
6
Maintainers
Readme
Custom React Native Slider
A fully customizable and responsive slider component for React Native.
Installation
Install via npm:
npm install RNSlider --save
or
yarn add RNSlider
Usage
import React, { useState } from 'react';
import { View, Text } from 'react-native';
import Slider from 'RNSlider'; // or your component path
const SliderExample = () => {
const [sliderValue, setSliderValue] = useState<number>(50);
return (
<View style={{ padding: 20 }}>
<Text>Slider Value: {sliderValue}</Text>
<Slider
minValue={0}
maxValue={100}
step={1}
initialValue={50}
thumbColor="blue"
trackColor="grey"
onValueChange={(value) => setSliderValue(value)}
/>
</View>
);
};
export default SliderExample;