2.0.1 • Published 8 months ago

react-customizable-progressbar v2.0.1

Weekly downloads
1,148
License
MIT
Repository
github
Last release
8 months ago

react-customizable-progressbar

Customizable circular SVG progress bar component for React

Check examples or generator to play around with all props

Installation

npm install --save react-customizable-progressbar

or

yarn add react-customizable-progressbar

Usage

import ProgressBar from 'react-customizable-progressbar';

<ProgressBar progress={60} radius={100} />;

Props

NameTypeDefaultDescription
radius (required)number100Progress bar radius
progress (required)number0Progress value (out of steps)
stepsnumber100Total steps
cutnumber0Angle of the circle sector
rotatenumber-90Progress rotation
strokeWidthnumber20Stroke width
strokeColorstring'indianred'Stroke color
strokeLinecapstring'round'Stroke line cap
transitionstring'0.3s ease'Transition
trackStrokeWidthnumber20Track stroke width
trackStrokeColorstring'#e6e6e6'Track stroke color
trackStrokeLinecapstring'round'Track stroke line cap
trackTransitionstring'1s ease'Track transition
pointerRadiusnumber0Pointer radius
pointerStrokeWidthnumber20Pointer stroke width
pointerStrokeColorstring'indianred'Pointer stroke color
pointerFillColorstring'white'Pointer fill color
initialAnimationboolfalseInitial animation
initialAnimationDelaynumber0Initial animation delay
inverseboolfalseInverse
counterClockwiseboolfalseCounter-clockwise
childrennodenullChildren - pass anything to show inside progress bar
classNamestring''Progress bar class name

Styles

.RCP {
}
.RCP__track {
}
.RCP__progress {
}
.RCP__pointer {
}

You can use these default indicator styles to center it both horizontally and vertically:

.your-indicator {
  display: flex;
  justify-content: center;
  text-align: center;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  user-select: none;
}

Run examples locally

npm install
npm run dev
2.0.1

8 months ago

2.0.0

10 months ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago