GithubHelp home page GithubHelp logo

paulxuca / rn-animated-progress-circle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonsteer/rn-animated-progress-circle

0.0 2.0 0.0 490 KB

A React Native animated progress circle component with no dependencies (aside from react-native)

License: MIT License

JavaScript 100.00%

rn-animated-progress-circle's Introduction

React Native Animated Progress Circle

Currently working on both Android and iOS on version 0.57 of react-native and up with the addition of support for overflow style property on Android

Props

PROP TYPE DESCRIPTION
value Number / Animated.Value Number between 0-1 which indicates the total progress of the circle. Default value is 0. Also accepts an Animated.Value (to be interpolated 0-1) if you wish to handle the timing of the animation outside of the component.
size Number Sets the size of the progress circle. Default size is 64.
thickness Number Sets the thickness of the progress circle. Default thickness is 7
color String Sets the color of the complete portion of the progress circle. Default color is #7e42ed.
unfilledColor String Sets the color of the incomplete portion of the progress circle. Default unfilledColor is transparent.
style Object Any arbitrary styles you want to pass to the component.
children ReactNode Any children you want to appear in the center of the progress circle.
animationMethod String Animation method to be used. Takes one of the following strings: timing, spring, bounce, decay. Setting this value will animate the component. Please note that this prop will have no effect if you choose to pass in an Animated.Value instead of a Number to the value prop.
animationConfig Object Configuration object to set animation parameters. See configuration docs for timing, spring, bounce, and decay. useNativeDriver is set to true by default. Please note that this prop will have no effect if you choose to pass in an Animated.Value instead of a Number to the value prop.
shouldAnimateFirstValue Boolean Indicates whether the initial value passed to the value prop should animate in or not. Defaults to false. If set to true, you should specify how you want the progress circle to animate via animationMethod and animationConfig props. Please note that this prop will have no effect if you choose to pass in an Animated.Value instead of a Number to the value prop.
onChange Function Callback function which gets called when the value prop changes.
onChangeAnimationEnd Function Callback function which gets called when the animation that occurs after the value prop changes is complete. Please note that this prop will have no effect if you choose to pass in an Animated.Value instead of a Number to the value prop.

Examples

Animated.spring to animate value changes with Text as children

animated gif of progress circle changing to different percentages of completion

source

A PieChart component that takes an array of objects as data: [{ color: String, value: Number }]

a colourful pie chart with six slices

source

rn-animated-progress-circle's People

Contributors

drop-simon avatar simonsteer avatar paulxuca avatar ingk avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.