1.0.0 • Published 6 years ago

react-dashed-progress v1.0.0

Weekly downloads
17
License
MIT
Repository
github
Last release
6 years ago

react-dashed-progress

A React.js component to draw circular progress bar

Examples

Getting started

Install react-dashed-progress using npm.

npm install --save react-dashed-progress

You can also test the components locally by cloning this repo and doing the following steps:

NPM-scripts

Install dependencies from package.json:

npm install

Runs the app in the development mode. Open http://localhost:1234 to view it in the browser.

npm run dev

Run linter

npm run lint

Start tests followed by jest

npm run test

Usage

import React from "react";
import ReactDOM from "react-dom";
import { DashedProgress } from "react-dashed-progress";

export class App extends React.Component {
    render() {
        return (
            <DashedProgress value={5} />
        );
    }
}

ReactDOM.render(<App />, document.getElementById("root"));

Props

PropsTypeDefault
sizeNumber160
barWidthNumber18
countBarsNumber30
trailThicknessNumber3
strokeThicknessNumber5
valueNumber0
strokeLinecap"butt", "square" , "round""round"
trailColorString#354A5E
strokeColorString#41B883
showTooltipBooleantrue
tooltipSizeNumber32
tooltipColorString#354A5E

Todo

  • Animation
  • Accessibility

Contributing

  • For bugs and feature requests, please create an issue
  • Lint and test your code
  • Pull requests and ⭐ stars are always welcome

License

MIT