All Projects → xnimorz → rprogress

xnimorz / rprogress

Licence: MIT license
React ajax loader progress bar with clear API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to rprogress

Loaders
Process dialogs, loading bars, etc.
Stars: ✭ 23 (+91.67%)
Mutual labels:  progress-bar, loader
Ngx Ui Loader
Multiple Loaders / spinners and Progress bar for Angular 5, 6, 7 and 8+
Stars: ✭ 368 (+2966.67%)
Mutual labels:  progress-bar, loader
Rsup Progress
❤️ A simple progress bar with promises support
Stars: ✭ 290 (+2316.67%)
Mutual labels:  progress-bar, loader
Boxloaderview
Stars: ✭ 76 (+533.33%)
Mutual labels:  progress-bar, loader
Ng Http Loader
🍡 Smart angular HTTP interceptor - Intercepts automagically HTTP requests and shows a spinkit spinner / loader / progress bar
Stars: ✭ 327 (+2625%)
Mutual labels:  progress-bar, loader
Vue Wait
Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
Stars: ✭ 1,869 (+15475%)
Mutual labels:  progress-bar, loader
tox-progress
This JavaScript library was made to easily create animated radial progress bars.
Stars: ✭ 13 (+8.33%)
Mutual labels:  progress-bar
react-native-less-transformer
Use Less to style your React Native apps.
Stars: ✭ 26 (+116.67%)
Mutual labels:  loader
circularProgressBar
This repo contains a demo app for circularProgressBar.swift
Stars: ✭ 17 (+41.67%)
Mutual labels:  progress-bar
webpack-modernizr-loader
Get your modernizr build bundled with webpack, use modernizr with webpack easily
Stars: ✭ 35 (+191.67%)
Mutual labels:  loader
GradientProgress
A gradient progress bar (UIProgressView).
Stars: ✭ 38 (+216.67%)
Mutual labels:  progress-bar
favicon-canvas-loader
Create and display a circular loading <canvas> animation as a webpage favicon.
Stars: ✭ 83 (+591.67%)
Mutual labels:  loader
webpack-image-srcset-loader
Generate srcset string from image
Stars: ✭ 28 (+133.33%)
Mutual labels:  loader
ngx-loader-indicator
Awesome loader for angular applications. No wrappers only you elements
Stars: ✭ 44 (+266.67%)
Mutual labels:  loader
Prevailer-orientation-support-library-for-Android
Prevailer is a simple android library that helps in preserving object instances across orientation change in android and is JAVA 8 and MVP ready.
Stars: ✭ 17 (+41.67%)
Mutual labels:  loader
pe-loader
A Windows PE format file loader
Stars: ✭ 81 (+575%)
Mutual labels:  loader
react-intl-loader
Async react-intl locale data loader for webpack
Stars: ✭ 46 (+283.33%)
Mutual labels:  loader
lp-loader
Frictionless language packs for Webpack.
Stars: ✭ 14 (+16.67%)
Mutual labels:  loader
CircularProgressBar
Another circular ProgressBar attempt
Stars: ✭ 14 (+16.67%)
Mutual labels:  progress-bar
moonlight-admin
Easy to use admin panel, designed for cheat loaders.
Stars: ✭ 29 (+141.67%)
Mutual labels:  loader

RProgress.js

RProgress is react ajax loader progress bar with clear API.

It's helpful to create Ajax-heavy apps. Library use API to manage progress bar.

Example: http://xnimorz.github.io/rprogress/

Install:

npm install --save rprogress

or

yarn add rprogress

Usage

There are several ways to use rprogress.js :

№1) use webpack bundle
import { RProgress, RProgressApi } from 'rprogress';

or

import { RProgress, RProgressApi } from 'rprogress/lib/index';

Then you need to add css-loader to your webpack config file.

For example:

 {
     test: /\.css$/,
     loader: ExtractTextPlugin.extract(
         'style',
         'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
     )
 }

RProgress support css-modules, but you can compile css without them:

 {
     test: /\.css$/,
     loader: ExtractTextPlugin.extract(
         'style',
         'css?importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
     )
 }

In this case rprogress will use "rpgogress", "rprogress-overlay" css classes.

№2) use source code
import { RProgress, RProgressAPI } from 'rprogress/src';

Then you need to add babel-loader for javascript code and css-loader with css-modules for styles to your webpack config file.

Such as:

module: {
        loaders: [
            { test: /\.jsx?$/, loader: "babel-loader"},
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract(
                    'style',
                    'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
                    'postcss-loader'
                )
            }
        ]
    }

Also you can open webpack.config.js or webpack.example.js (without css-modules) to check webpack configs.

API

RProgressApi.start() - show progress. Progress position will be from 0 to 12%

RProgressApi.step() - increase progress position by 10%

RProgressApi.step(to) - set up progress position to to%

RProgressApi.complete() - set up progress position to 100% and close progress when animation is over

RProgressApi.release() - set up progress position to 0

RProgressApi.subscribe(callback) - call callback-function after any progress position changes

RProgressApi.toggleAnimation(animationEnableFlag) - turn off\on auto-progress

Auto-progress

Progress bar indicate working and after every 500ms animate himself. In this case progress bar position increase up to 2% You can turn off auto-progress call RProgressApi.toggleAnimation(false)

Customization

Color:
React.render(<RProgress color='#21B919' />);
Type:

RProgress supports two types:

  • incremental (default) progress bar
  • cycle

Turn on cycle type:

React.render(<RProgress type='cycle' />);
Custom class:
import { RProgress } from 'rprogress';

import 'myStylesClass.css';

React.render(<RProgress className='myStylesClass' />);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].