项目作者: nickstanish

项目描述 :
React progress bars
高级语言: JavaScript
项目地址: git://github.com/nickstanish/reprogressbars.git
创建时间: 2017-01-08T00:06:49Z
项目社区:https://github.com/nickstanish/reprogressbars

开源协议:MIT License

下载


Reprogressbars

npm version
npm downloads
MIT License
Build Status
minzipped size

Intro

Reprogressbars is a progress bar library built on React.

The main purpose of this library is to simplify displaying progress from ajax requests so that you can just specify when you are and are not loading, and Reprogressbars can animate automatically in between.

Examples

  1. import { ProgressBar } from 'reprogressbars';
  2. <ProgressBar isLoading={this.state.isLoading} ></ProgressBar>

For a progress bar fixed to the top of your page:

  1. <ProgressBar isLoading={this.state.isLoading} className="fixed-progress-bar" ></ProgressBar>
  1. .fixed-progress-bar {
  2. position: fixed;
  3. left: 0;
  4. top: 0;
  5. width: 100%;
  6. }

The isLoading prop makes for simple integration with Redux.

You can also change the height or color:

  1. <ProgressBar isLoading={this.state.isLoading} height="4px" color="#B71C1C" ></ProgressBar>

API

See docs

Contribution

Please create an issue for issues or bugs. Pull requests welcome.

License

MIT

Copyright (c) 2017-2021 Nick Stanish