@devtar/slider v1.0.0
Ephraim Devtar šļø
LOGO
Ephraim Slider is a sleek, customizable, and smooth React Native slider designed for seamless user interaction.
It supports gesture-based control, dynamic progress tracking, and a modern UI that enhances any mobile app experience.
⨠Features
ā
Fully customizable (colors, size, animations)
ā
Supports React Native Reanimated for smooth interactions
ā
Gesture-based control using react-native-gesture-handler
ā
Lightweight & high performance
ā
Works with Expo & React Native CLI
ā
Compatible with iOS & Android
šø Screenshots
| Light Mode | Dark Mode |
|---|---|
š Installation
Install the package via npm or yarn:
npm install @devtar/slider --save
# or
yarn add @devtar/sliderAlso, install required peer dependencies:
npm install react-native-gesture-handler react-native-reanimated react-native-svgFor Expo projects, ensure you have @expo/vector-icons installed:
npm install @expo/vector-iconsš§ Usage
Basic Example
import DevtarSlider from '@devtar/slider';
import React from 'react';
import { View } from 'react-native';
const App = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<DevtarSlider
min={0}
max={100}
step={1}
value={50}
onChange={(val) => console.log(val)}
/>
</View>
);
};
export default App;Advance Code
import { Text, SafeAreaView, StyleSheet } from 'react-native';
import React from 'react'
// You can import supported modules from npm
import DevtarSlider from '@devtar/slider';
export default function App() {
const [volume,setVolume] = React.useState(40)
//is best for your initial value to be the same with your volume value
return (
<SafeAreaView style={styles.container}>
<Text style={{color:"white",fontSize:20, margin:10}}>Vol: {volume}</Text>
<DevtarSlider
options={{ //for customizing some properties
showIcon: true, // for icon to show true
showCounter: true, // to show counter
iconColor: '#fff',
counterColor: '#fff',
backgroundColor: '#000',
minimumValue:0,
maximumValue:100,
paddingSize:9,
fillBorderRadius:10,
widthSize:80,
initialValue:40,
iconChange:false,
ephraimMeta:{
colorOne:"#000",
colorTwo:"#333",
gradientPosition:{x1:1,y1:0,x2:0,y2:2},
enableStroke:true,
strokeSize:2,
strokeColor:"#333",
innerColor:"#fff"
},
}}
onValueChange={setVolume}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
backgroundColor: '#555',
padding: 8,
paddingLeft: 125,
},
});šØ Customization
š Live Demo (Try it on Expo Snack)
Ephraim Slider is highly customizable with props:
| Prop | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Minimum value of the slider |
max | number | 100 | Maximum value of the slider |
step | number | 1 | Step value for increments |
value | number | 0 | Initial slider value |
onChange | function | () | Callback for value change |
trackColor | string | #ccc | Color of the track |
thumbColor | string | #000 | Color of the thumb |
š Requirements
- React Native 0.68+
- Expo SDK 49+ (for Expo users)
- Peer Dependencies:
react-native-reanimatedreact-native-gesture-handlerreact-native-svg
š ļø Development & Contribution
Want to improve Ephraim Slider? Feel free to fork, contribute, or report issues!
- Clone the repo:
git clone https://github.com/devtar/slider.git - Install dependencies:
cd slider npm install - Run the example app (optional):
cd example && npm start - Make changes and create a Pull Request š
Preview
š License
This project is licensed under the MIT License. Feel free to use, modify, and distribute it, but you must include attribution.
š¬ Support & Contact
For questions, issues, or feature requests, open an issue or contact me at ahitubephriam5@gmail.com/ https://gravatar.com/ahitubephriam5.
CONTACT NUMBER:+2349168033116
š Made with ā¤ļø by Ephraim Senior Dev
8 months ago