Home

Awesome

styled-loaders-react

Build Status npm version

Loaders for React built with Styled Components.

Credits

This is React clone of SaraVieira 's amazing styled-loaders which provides loaders for Preact.

Huge thanks for all the hard work and letting me port it for React users.

Any new loaders that will be added in that original repository will be cloned here.

Usage

npm install styled-loaders-react

or

yarn add styled-loaders-react
import React from 'react'
import { Cube } from 'styled-loaders-react'

const Page = ({ loading }) =>
    <div>
        { loading ?
            <Cube/>
            : 'Your Content'
        }
    </div>

With Props

import React from 'react'
import { Block } from 'styled-loaders-react'

const Page = ({ loading }) =>
    <div>
        { loading ?
            <Block color="red" size="60px" duration="5s" />
            : 'Your Content'
        }
    </div>

Loaders

License

MIT