rla
react-loading-animation
npm i react-loading-animation
rla

react-loading-animation

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

by Nathan Hoad

1.4.0 (see all)License:ISCTypeScript:Not Found
npm i react-loading-animation
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

Downloads/wk

209

GitHub Stars

34

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
1.4.0
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate