2017-08-27 18:40:23 -07:00
2017-08-27 18:40:02 -07:00
2017-08-27 18:07:10 -07:00
2017-08-27 18:38:51 -07:00
2017-02-04 21:37:46 -08:00
2017-02-04 20:18:39 -08:00
2016-11-27 18:42:57 -08:00
2017-06-24 18:48:04 -07:00
2017-08-27 18:40:23 -07:00
2017-08-27 17:05:31 -07:00

React Circular Progressbar

A circular progress indicator component, built with SVG. Easily customizable with CSS. See a live demo.

npm version Build Status

react-circular-progressbar animated gif

Installation

Install the npm module:

npm install react-circular-progressbar

Include the default styles into your CSS by copying src/styles.css into your repo.

Usage

Import the component:

import CircularProgressbar from 'react-circular-progressbar';

..and use the component in your JSX:

<CircularProgressbar percentage={60} />

Props

Name Description
percentage Numeric percentage to display, from 0-100. Required.
strokeWidth Width of circular line. Default: 8.
className Classes to apply to the svg element
initialAnimation Toggle whether to animate progress starting from 0% on initial mount. Default: false.
classForPercentage Function which returns an additional class to apply to top-level svg element, which can be used for coloring/styling percentage ranges differently. Example: (percent) => percent < 100 ? 'incomplete' : 'complete'.
textForPercentage Function which returns text to display, can be configured based on percentage. Example: (pct) => `${pct}%` .

See the demo page JSX to see code used on the live demo page.

Development

To run demo locally on localhost:8080:

npm install
npm start

Keep CI tests passing by running npm test and npm run lint often.

Description
A circular progressbar component, built with SVG and extensively customizable
Readme MIT 4.1 MiB
Languages
TypeScript 91.6%
CSS 6.3%
JavaScript 2.1%