Socket
Socket
Sign inDemoInstall

react-native-multicolor-progress-bar

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-multicolor-progress-bar

This package allows the user to use different colours to display multiple items in a single linear progress bar


Version published
Weekly downloads
711
decreased by-14.75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-multicolor-progress-bar

v2 supports latest version of react. v1 has the older version of react.

Progress indicators

example

SC Image

Installation

npm install react-native-multicolor-progress-bar --save

Usage

import {ProgressBar} from 'react-native-multicolor-progress-bar';

<ProgressBar
  arrayOfProgressObjects={[
   {
     color: 'red',
     value: 0.4,
     nameToDisplay: "40%"
   },
   {
     color: 'blue',
     value: 0.6,
     opacity: 0.5
   },
  ]}
/>

Properties for progress component

PropDataTypeDescriptionDefault
parentViewStylestylesChange the styling of the container view{alignItems:'stretch'}
backgroundBarStylestylesChange the styling of base progress bar{alignItems:'stretch',backgroundColor: '#EFF1F5',borderRadius: 8.5,height: 12}
onStartProgressStylestylesChange the border radius of starting progress bar{borderTopLeftRadius: 8.5,borderBottomLeftRadius: 8.5}
onEndProgressStylestylesChange the border radius of ending progress bar if it reaches the end of base progress bar{borderTopRightRadius: 8.5,borderBottomRightRadius: 8.5}
arrayOfProgressObjectsarray of ObjectsContains the progress objects.[]
onPressfunctionif provided, this function will be called if the user taps on the progress barundefined
textStylestylesstyling of the text displayed in each coloured progress bar{fontSize:10}

Progress Object

KeyDataTypeValue
colorstringcolor of the progress object
opacitynumberopacity of the progress object
nameToDisplaystringif exists, displays this on the progress
valuenumber ranging from 0 - 1value of the progress
Example project bundled with this module

Keywords

FAQs

Last updated on 02 May 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc