• Stars
    star
    3,628
  • Rank 12,202 (Top 0.3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Progress indicators and spinners for React Native

react-native-progress

Progress indicators and spinners for React Native using React Native SVG.

progress-demo

Installation

$ npm install react-native-progress --save

React Native SVG based components

To use the Pie or Circle components, you need to install React Native SVG in your project.

Usage

Note: If you don't want the React Native SVG based components and it's dependencies, do a deep require instead: import ProgressBar from 'react-native-progress/Bar';.

import * as Progress from 'react-native-progress';

<Progress.Bar progress={0.3} width={200} />
<Progress.Pie progress={0.4} size={50} />
<Progress.Circle size={30} indeterminate={true} />
<Progress.CircleSnail color={['red', 'green', 'blue']} />

Properties for all progress components

Prop Description Default
animated Whether or not to animate changes to progress. true
indeterminate If set to true, the indicator will spin and progress prop will be ignored. false
indeterminateAnimationDuration Sets animation duration in milliseconds when indeterminate is set. 1000
progress Progress of whatever the indicator is indicating. A number between 0 and 1. 0
color Fill color of the indicator. rgba(0, 122, 255, 1)
unfilledColor Color of the remaining progress. None
borderWidth Width of outer border, set to 0 to remove. 1
borderColor Color of outer border. color

Progress.Bar

All of the props under Properties in addition to the following:

Prop Description Default
width Full width of the progress bar, set to null to use automatic flexbox sizing. 150
height Height of the progress bar. 6
borderRadius Rounding of corners, set to 0 to disable. 4
useNativeDriver Use native driver for the animations. false
animationConfig Config that is passed into the Animated function. { bounciness: 0 }
animationType Animation type to animate the progress, one of: decay, timing, spring. spring

Progress.Circle

All of the props under Properties in addition to the following:

Prop Description Default
size Diameter of the circle. 40
endAngle Determines the endAngle of the circle. A number between 0 and 1. The final endAngle would be the number multiplied by 2Ο€ 0.9
thickness Thickness of the inner circle. 3
showsText Whether or not to show a text representation of current progress. false
formatText(progress) A function returning a string to be displayed for the textual representation. See source
textStyle Styles for progress text, defaults to a same color as circle and fontSize proportional to size prop. None
allowFontScaling Whether or not to respect device font scale setting. true
direction Direction of the circle clockwise or counter-clockwise. clockwise
strokeCap Stroke Cap style for the circle butt, square or round. butt
fill Fill color of the inner circle. None (transparent)

Progress.Pie

All of the props under Properties in addition to the following:

Prop Description Default
size Diameter of the pie. 40

Progress.CircleSnail

Prop Description Default
animating If the circle should animate. true
hidesWhenStopped If the circle should be removed when not animating. false
size Diameter of the circle. 40
color Color of the circle, use an array of colors for rainbow effect. rgba(0, 122, 255, 1)
thickness Thickness of the circle. 3
duration Duration of animation. 1000
spinDuration Duration of spin (orbit) animation. 5000
strokeCap Stroke Cap style for the circle butt, square or round. round

Examples

Changelog

Thanks

To Mandarin Drummond for giving me the NPM name.

License

MIT License. Β© Joel Arvidsson 2015-

More Repositories

1

react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
JavaScript
17,427
star
2

react-native-animatable

Standard set of easy to use animations and declarative transitions for React Native
JavaScript
9,838
star
3

hush

🀫 Noiseless Browsing – Content Blocker for Safari
JavaScript
3,264
star
4

react-native-keychain

πŸ”‘ Keychain Access for React Native
Kotlin
3,194
star
5

react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native
JavaScript
2,818
star
6

react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
JavaScript
2,450
star
7

loki

πŸ‘ Visual Regression Testing for Storybook
JavaScript
1,778
star
8

react-native-image-progress

Progress indicator for networked images in React Native
JavaScript
1,723
star
9

angular-scroll

Scrollspy, animated scrollTo and scroll events for angular.js
JavaScript
1,482
star
10

react-native-performance

πŸ“ Monitor and measure React Native performance
TypeScript
929
star
11

react-native-store-review

Rate on App/Play Store directly in your React Native app
Java
751
star
12

react-native-shimmer

Simple shimmering effect for any view in React Native
Java
700
star
13

react-native-esbuild

Fast bundler and dev server for react-native using esbuild
JavaScript
595
star
14

react-native-parallax

Parallax effects for React Native using Animated API
JavaScript
585
star
15

react-native-vector-image

iOS/Android native vector assets generated from SVG
JavaScript
310
star
16

react-native-pinchable

Instagram like pinch to zoom for React Native
Java
225
star
17

angular-parallax

Lightweight & performant parallax scrolling for angular.js.
JavaScript
203
star
18

angular-lazytube

Lightweight, responsive, lazy loaded YouTube videos that degrades gracefully.
JavaScript
45
star
19

diglett

Keep your JS project lean by detecting duplicate dependencies
JavaScript
44
star
20

esbuild-server

Fast, lightweight and powerful development server for esbuild
TypeScript
38
star
21

react-native-oxc

10x your react-native builds with OXC
TypeScript
28
star
22

oblador.github.io

Landing page for my GitHub projects
HTML
10
star
23

oblador

5
star
24

node-cloud-imager

Powerful yet simple way to apply filters/crop/resize images and upload to cloud providers (Amazon S3, Rackspace, Azure).
JavaScript
3
star
25

node-ups-sdk

JavaScript
3
star
26

sovra

🀏 Rust-based Test Decider for JavaScript using Oxc
Rust
2
star
27

expo-requestidlecallback-issue

TypeScript
1
star
28

react-native-android-autolinking-bug-repro

TypeScript
1
star
29

.github

1
star
30

react-native-fabric-image-unicode-issue

TypeScript
1
star