1.0.0 • Published 2 years ago

rn-arc-slider v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Native Arc Slider

MIT Issues Installs Start

:rocket: Getting Started

Install

  • Install the library and react-native-svg

    npm i --save rn-arc-slider react-native-svg
  • Link native code for SVG

    npx react-native link react-native-svg

Usage

import ArcSlider from "rn-arc-slider";
<ArcSlider
  value={value}
  onChange={setValue}
  trackColor={"red"}
  showThumbText
  showText
/>

:sparkles: Props

Prop NameTypeDefaultDescription
trackRadiusnumber100Radius of Circular Slider
thumbRadiusnumber12Size of Thumb
trackWidthnumber5Size of Track
valuenumber0Value between minValue to maxValue
minValuenumber0Minimum value
maxValuenumber100Maximum value
onChange((angle: number) => any)noneonChange Handler
trackColorstring#2089dcColor for Track
trackTintColorstring#e1e8eeColor for Track Tint
thumbColorstring#2089dcColor for Thumb
thumbTextColorstringwhiteColor for Text on Thumb
thumbTextSizenumber10Font size for Text on Thumb
showThumbTextbooleanfalseShow text on center of thumb
noThumbbooleanfalseShow Thumb on Track
showTextbooleanfalseShow text on center of circle
textColorstring#2089dcText color for center of circle
textSizenumber80Text Size for center of circle
maxAnglenumber359.9Maximum arc angle in degrees i.e. its range is 0 to 359
minAnglenumber0Minimum arc angle in degrees i.e. its range is 0 to 359

:handshake: Contribution

All PRs are welcome

:memo: License

This project is under license from MIT. For more details, see the LICENSE file.

Made with :heart: by Arpit Bhalla

 

Back to top