React Native Circle Slider Example


Share:
Published By: Admin, Published On: Nov 13, 2021, Category: React Native
React Native Circle Slider Example

Hi Guys,

Today, I will learn you how to implement circle slider in react native. we will show example of react native circle slider.

Here, I will give you full example for simply implement circle slider using react native as bellow.

Step 1 - Create project

In the first step Run the following command for create project.

expo init MyWebtutsProject
Step 2 - Install Package

In the step,I will install react-native-circle-slider.

yarn add react-native-circle-slider
Step 3 - App.js

In this step, You will open App.js file and put the code.

import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import CircleSlider from "react-native-circle-slider";

export default class CircleSliderExample extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.heading}>React Native Circle Slider</Text>
        <CircleSlider btnRadius={20} textSize={18} strokeWidth={5} meterColor={'#3DBBC3'} strokeColor={'#e1e1e1'} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  heading: {
    fontSize: 25,
    marginBottom: 20
  }
});
Step 4 - Run project

In the last step run your project using bellow command.

expo start
Output

It will help you..

Share: