Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

progress-react-native

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progress-react-native

Progress indicators and spinners for React Native using react native svg

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Progress Animated

Progress indicator using reanimated and react native svg


Table of Contents

  1. Installation
  2. Usage
  3. Props
  4. Credits
  5. License

Installation

yarn add progress-react-native
# or
npm install progress-react-native

Also, you need to install react-native-reanimated, & react-native-svg, and follow theirs installation instructions.

Usage

Progress Bar
import * as React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import ProgressReactNative from 'progress-react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <ProgressReactNative preset={'bar'} indeterminate={false} progress={40} duration={2000} />
      <ProgressReactNative preset={'pie'} indeterminate={false} progress={40} duration={2000} />
      <ProgressReactNative preset={'cicle'} showText={true} textConcat={'%'} indeterminate={false} progress={40} duration={2000} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Props

namerequireddefaultdescription
presetNO"bar"Preset for progress.
progressNO0Current progress.
animatedNOtrueFlag to use animated when progress change or not.
durationNO1000Duration of animated.
indeterminateNOfalseIf set to true, the indicator will spin.
Bar Props
namerequireddefaultdescription
heightNO6Height of the progress bar.
colorNO#0057e7Color of indicator.
borderRadiusNO4Rounding of corners, set to 0 to disable.
borderColorNO#0057e7Color of outer border.
borderWithNO1Width of outer border, set to 0 to remove.
Circle Props
namerequireddefaultdescription
radiusNO40Radius of circle.
strokeWidthNO4Width of stroke.
strokeColorNO#0057e7Stroke color .
bgStrokeColorNOtransparentBackground stroke color .
isRadiusNOfalseUsing radius for progress line.
showTextNOfalseShow current progress or not.
textConcatNO''Text assigned after the progress.
textStyleNO''Text style for progress.
Pie Props
namerequireddefaultdescription
radiusNO40Radius of Pie.
strokeWidthNO1Width of stroke.
strokeColorNO#0057e7Stroke color.
fillColorNO#0057e7Color of progress.
bgColorNOtransparentBackground color stroke.

Built With

License

MIT


Keywords

FAQs

Package last updated on 19 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc