rla

react-loading-animation

A pretty loading spinner based on Google's colorful spinner animation.

Showing:

Popularity

Downloads/wk

458

GitHub Stars

33

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

1.4KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Readme

React Loading Animation

A simple loading component to show a colorful animated spinner.

Usage

const Loading = require('react-loading-animation');

You can either render the component directly (with no props) or render it as a parent of other components and pass in isLoading as a prop:

const ListOfThings = ({ isFetching, things }) => {
    if (isFetching && things.size() == 0) return <Loading />;
    
    return (
        <ul>
            ...
        </ul>
    );
}

or

const ListOfThings = ({ isFetching, things }) => {
    return (
        <Loading isLoading={isFetching && things.size() == 0}>
            <ul>
                ...
            </ul>
        </Loading>
    );
}

Thanks

This component is based on the work at https://codepen.io/jczimm/pen/vEBpoL

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Tutorials

No tutorials found
Add a tutorial