@tiaanduplessis/react-progressbar

1.0.0 • Public • Published

react-progressbar

Little React wrapper around progressbar.js

JavaScript Style Guide

Install

npm install --save @tiaanduplessis/react-progressbar

Usage

import { Circle, Line } from '@tiaanduplessis/react-progressbar'
const Example = () => {
  return <>
          <Circle
            style={{ width: '200px' }}
            progress={10 / 100}
            color={'red'}
            trailColor={'pink'}
            strokeWidth={4}
            easing='easeInOut'
            text={{
              value: 'Example',
              style: {
                color: '#515251',
                position: 'absolute',
                left: '50%',
                top: '50%',
                textAlign: 'center',
                padding: 0,
                margin: 0,
                transform: {
                  prefix: true,
                  value: 'translate(-50%, -50%)'
                }
              }
            }}
          />


        <Line
          progress={10/100}
          strokeWidth={4}
          easing='easeInOut'
          color={'blue'}
          trailColor='orange'
          svgStyle={{
            display: 'block',
            width: '100%',
            'max-height': '1em',
            'border-radius': '20px'
          }}
          text={{
            className: 'dashboard-tile-line-progress-text',
            style: {
              color: '#515251',
              padding: 0,
              margin: 0
            }
          }}
        />
  </>
}

License

MIT © tiaanduplessis


Created using create-react-hook.

Readme

Keywords

none

Package Sidebar

Install

npm i @tiaanduplessis/react-progressbar

Weekly Downloads

22

Version

1.0.0

License

MIT

Unpacked Size

85.5 kB

Total Files

17

Last publish

Collaborators

  • tiaanduplessis