2.0.1 • Published 1 year ago
react-customizable-progressbar v2.0.1
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-progressbaror
yarn add react-customizable-progressbarUsage
import ProgressBar from 'react-customizable-progressbar';
<ProgressBar progress={60} radius={100} />;Props
| Name | Type | Default | Description | 
|---|---|---|---|
radius (required) | number | 100 | Progress bar radius | 
progress (required) | number | 0 | Progress value (out of steps) | 
steps | number | 100 | Total steps | 
cut | number | 0 | Angle of the circle sector | 
rotate | number | -90 | Progress rotation | 
strokeWidth | number | 20 | Stroke width | 
strokeColor | string | 'indianred' | Stroke color | 
strokeLinecap | string | 'round' | Stroke line cap | 
transition | string | '0.3s ease' | Transition | 
trackStrokeWidth | number | 20 | Track stroke width | 
trackStrokeColor | string | '#e6e6e6' | Track stroke color | 
trackStrokeLinecap | string | 'round' | Track stroke line cap | 
trackTransition | string | '1s ease' | Track transition | 
pointerRadius | number | 0 | Pointer radius | 
pointerStrokeWidth | number | 20 | Pointer stroke width | 
pointerStrokeColor | string | 'indianred' | Pointer stroke color | 
pointerFillColor | string | 'white' | Pointer fill color | 
initialAnimation | bool | false | Initial animation | 
initialAnimationDelay | number | 0 | Initial animation delay | 
inverse | bool | false | Inverse | 
counterClockwise | bool | false | Counter-clockwise | 
children | node | null | Children - pass anything to show inside progress bar | 
className | string | '' | 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 dev2.0.1
1 year ago
2.0.0
1 year ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
7 years ago
0.1.22
7 years ago
0.1.21
7 years ago
0.1.20
7 years ago
0.1.19
7 years ago
0.1.18
7 years ago
0.1.17
7 years ago
0.1.16
7 years ago
0.1.15
7 years ago
0.1.14
7 years ago
0.1.13
7 years ago
0.1.12
7 years ago
0.1.11
7 years ago
0.1.10
7 years ago
0.1.9
7 years ago
0.1.8
7 years ago
0.1.7
7 years ago
0.1.6
7 years ago
0.1.5
7 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