rc-progress

Progress Bar.

NPM version dumi build status Test coverage npm download bundle size

Example

https://progress.react-component.vercel.app/

Screenshots

Browsers

  • support IE9+, Chrome, Firefox, Safari

Install

rc-progress

Usage

import { Line, Circle } from 'rc-progress';
export default () => (
<>
<Line percent="10" strokeWidth="4" strokeColor="#D3D3D3" />
<Circle percent="10" strokeWidth="4" strokeColor="#D3D3D3" />
</>
);

Compatibility

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

API

props

nametypedefaultdescription
strokeWidthNumber1Width of the stroke. Unit is percentage of SVG canvas size.
strokeColorString#2db7f5Stroke color.
trailWidthNumber1Width of the trail stroke. Unit is percentage of SVG canvas size. Trail is always centered relative to actual progress path. If trailWidth are not defined, it same as strokeWidth.
trailColorString#D9D9D9Color for lighter trail stroke underneath the actual progress path.
strokeLinecapString'round'The shape to be used at the end of the progress bar, can be `butt`, `square` or `round`.
prefixClsStringrc-progressprefix className for component
classNameStringcustomized className
styleObjectstyle object will be added to svg element
percentNumber0the percent of the progress
gapDegreeNumber0the gap degree of half circle, 0 - 360
gapPositionStringtopthe gap position, value: top, bottom, left, right.
dotBoolean | Objectfalsewithin dot or not, value: true, false, { size: Number }, if the size is not a number, it will be the strokeWidth as default

Installation

npm install --save rc-progress

Development

npm install
npm start

License

rc-progress is released under the MIT license.