Socket
Book a DemoInstallSign in
Socket

react-progress-indicator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-progress-indicator

React loading indicator (depreated use: react-progress-2)

Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

JSPM

jspm install npm:react-progress-indicator --save

Usage

Include jspm_packages/react-progress-indicator/main.css to your html-file, for instance:

<html>
    <head>
        <meta charset="UTF-8">
        <title>React progress indicator example</title>
        <!-- progress indicator -->
        <link rel="stylesheet" href="/jspm_packages/react-progress-indicator/main.css" />
    </head>
    <body></body>
</html>

Include react-progress-indicator and put it somewhere in the top-component, for example:

import React from "react";
import LoadingIndicator from "react-progress-indicator";

var Layout = React.createClass({
    render: function() {
        return (
            <div className="layout">
                <LoadingIndicator/>
                {/* other components go here*/}
            </div>
        );
    }
});

Now, whenever you need to show an indicator, trigger loader.show, for example:

loadFeed: function() {
    $(window).trigger("loader.show");
    // do your ajax thing.
},

onLoadFeedCallback: function() {
    $(window).trigger("loader.hide");
    // render feed.
}

Styling

.loader-60devs .loader-60devs-progress {
    background: #ff6f00;
}

Examples

Examples

Authors and Contributors

Created in 2015 by Ruslan Prytula (@milworm).

Keywords

progress-indicator

FAQs

Package last updated on 28 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts