1.0.2 • Published 4 years ago

react-progressbar-line v1.0.2

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

react-progressbar-line

A linear progressbar component. Demo

NPM JavaScript Style Guide

Install

npm install --save react-progressbar-line

Usage

import React, { Component } from 'react'

import ProgressBarLine from 'react-progressbar-line'

class ProgressBarLineExample extends Component {
  render() {
    return (
      <ProgressBarLine
        value={50}
        min={0}
        max={100}
        strokeWidth={5}
        trailWidth={5}
        styles={{
          path: {
            stroke: '#17b978'
          },
          trail: {
            stroke: '#a7ff83'
          },
          text: {
            fill: '#404040',
            textAlign: 'center',
            fontSize: '32px'
          }
        }}
      />
    )
  }
}

Props

NameDescriptionDefault
valueValue for the progress bar. Required50
minMin value for the progress bar0
maxMax value for the progress bar100
strokeWidthstrokeWidth for the progress bar5
trailWidthtrailWidth for the progress bar trail path5
flipFlip direction rtl horizontallyfalse
textText for the progress bar''
stylesCustom styles for the progress bar

Ideas for future development

  • add round strokeLinecap
  • add animation effects
  • update demo page with react-styleguidist

License

MIT © brijesh-pant