A react native content loader without expo
npm install rn-content-loaderThis component make Animated Linear Gradient for all SVG components as child props. You can use this component as loading component like Facebook or Instagram, used for any group of svg.
![]() | ![]() |
npm i rn-content-loader --save
or
yarn add rn-content-loader
you will have to install react native svg
Inside your component:
``js`
import ContentLoader from 'rn-content-loader';
#### Instagram style
`jsx`
#### Facebook style
`jsx`
#### Code style
`jsx``
| Prop | Type | Default | Description |
| -------------- | ------ | --------- | ----------------------------------------------------- |
| primaryColor | String | '#eeeeee' | Primary color, also background color |
| secondaryColor | String | '#dddddd' | Secondary color |
| width | Number | 300 | Width of SVG |
| height | Number | 200 | Height of SVG |
| viewBox | String | '0 0 300 200' | ViewBox of SVG |
| x1 | String | '0' | x of point star gradient, accept Number or Percentage |
| y1 | String | '0' | y of point star gradient, accept Number or Percentage |
| x2 | String | '100%' | x of point end gradient, accept Number or Percentage |
| y2 | String | '0' | y of point end gradient, accept Number or Percentage |
- React Native Svg
- Vova Bilonenko with his gist
- React Content Loader
- Create Content Loader
- React Native SVG Animated Linear Gradient
MIT