项目作者: twisty

项目描述 :
Circular progress bar. React component.
高级语言: JavaScript
项目地址: git://github.com/twisty/react-radial-progress-indicator.git
创建时间: 2018-09-07T22:39:07Z
项目社区:https://github.com/twisty/react-radial-progress-indicator

开源协议:MIT License

下载


Bundle size
GitHub issues
CodeFactor
GitHub license

react-radial-progress-indicator

A React component that displays a customisable circular progress indicator.

The indicator can display segmented steps (like “you’re on step 3/10”), or a smooth sweep to any position around the ring (useful when progress is measured as a percentage).

Features

  • Lightweight: ~2kb when minified and gzipped. No runtime dependencies.
  • Responsive: draws natively at the pixel density of your screen using HTML5 canvas.
  • Tweakable: colours, layout metrics, and text can be fine-tuned for your layout.
  • Animatable: animates between steps with customisable speed.

Install

Install with yarn…

  1. yarn add react-radial-progress-indicator

…or npm:

  1. npm install react-radial-progress-indicator

Examples

Animated example

For examples and usage, have a look at this storybook.

Usage

  1. import React from 'react'
  2. import { RadialProgress } from 'react-radial-progress-indicator';
  3. const UsageExample = (props) => {
  4. return (
  5. <RadialProgress
  6. width={100}
  7. height={100}
  8. steps={10}
  9. step={3}
  10. ></RadialProgress>
  11. );
  12. );

See the jsx tab in the storybook for more usage examples.

API

A full list of props available to customise the component can be found here: docs/api.md