1.0.0 • Published 8 months ago

react-simple-circular-progress v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

react-simple-circular-progress

A simple circular progress indicator component for React

NPM version Downloads

React Native implementation of react-simple-circular-progress

Screenshots

npm.io

Installation

yarn add react-simple-circular-progress

or

npm i react-simple-circular-progress

Examples

<CircularProgress
  size={106}
  percent={75}
  progressBarColor={[[0, '#2C40F3'], [100, '#C2E1FF']]}
>
  <div className='circular-indicator-content'>
    <span>Scores</span>
    <span>5846</span>
  </div>
</CircularProgress>

npm.io

<CircularProgress
  size={106}
  percent={41}
  progressBarColor={[[0, '#1CC490'], [100, '#CEFFBD']]}
  scaleAngles={[0, -45, -90, -135, 180]}
  scaleOpacity={0.15}
  scaleColor='#888'
>
  <div className='circular-indicator-content'>
    <span>41%</span>
  </div>
</CircularProgress>

npm.io

<CircularProgress
  size={106}
  percent={75}
  progressBarColor={[[0, '#9C3AE9'], [100, '#CCBDFF']]}
  scaleAngles={[0, -45, -90, -135, 180]}
  scaleOpacity={0.15}
>
  <div className='circular-indicator-content'>
    <span>Status</span>
    <span>Good</span>
  </div>
</CircularProgress>

npm.io

circular-progress-content styles:

.circular-progress-content: {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

API

proptypedefault value
sizenumber
percentnumber1
gapAnglenumber90
backgroundBarColorstring'#F5F5F4'
progressBarWidthnumber15
progressBarColorstring [number, string][]'#2C40F3'
progressBarOpacitynumber1
progressFillColorstring'none'
scaleAnglesnumber[]
scaleWidthnumber2
scaleColorstring'#2a2a2a'
scaleOpacitynumber0.1
svgExtraPropsRecord<string, any>{}