Skip to content

thongdong7/react-pace-progress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Pace Progress

React Pace Progress is a simple pace-style progressbar component.

example

Install

The only way to use React-Pace-Progressbar is to install it from NPM.

$ npm install react-pace-progress --save

You need to import it and include in your own React build progress (using Webpack, e.g).

import Pace from 'react-pace-progress'

Usage

Use Pace like any other react component. Pace renders a thin horizontal progressbar infinitely approaching 100%. It never reaches 100%.

  // inside your react component
  
  load = ()=>{
    this.setState({isLoading: true});
    fetch().then(()=>{
      // deal with data fetched
      this.setState({isLoading: false})
    })
  };
  
  render(){
    return (
      <div>
        {this.state.isLoading ? <Pace color="#27ae60"/> : null}
        ... content
      </div>
    )
  }

Props

Use props to custom Pace component.

  • height: number, progressbar height in pixels.
  • color: string, progressbar color.

About

react pace-style progress bar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.2%
  • HTML 11.8%