Loaders for React built with Styled Components.
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.
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>
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>
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- size - Size of the spinner default is 40px
- cubeSize - Size of the each cube default is 15
- duration - Animation duration default is 1.2s
- Props
-
- Props
- color - Background of the spinner default is #333
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- dotSize - Size of the dots default is 18px
- Props
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- Props
-
- Props
- color - Background of the spinner default is #333
- duration - Animation duration default is 1.2s
- size - Size of the spinner default is 40px
- rectWidth - Width of each rectangle default is 6px
- Props
MIT