@@ -54,44 +54,93 @@ const MyLoader = () => (
5454
5555## Options
5656
57- | Name | Type | Default | Description |
58- | ------------------- | -------- | --------------- | --------------------------------------------------------------- |
59- | speed | _ Number_ | ` 2 ` | Animation speed |
60- | width | _ Number_ | ` 400 ` | ** viewBox** width of SVG |
61- | height | _ Number_ | ` 130 ` | ** viewBox** height of SVG |
62- | style | _ Object_ | ` null ` | Ex: ` { marginTop: '50px' } ` |
63- | primaryColor | _ String_ | ` #f3f3f3 ` | Background the SVG |
64- | secondaryColor | _ String_ | ` #ecebeb ` | Animation color |
65- | preserveAspectRatio | _ String_ | ` xMidYMid meet ` | Aspect ratio option of SVG |
66- | className | _ String_ | '' | Classname in the <svg /> |
57+ | Name | Type | Default | Description |
58+ | ------------------- | -------- | --------------- | --------------------------- |
59+ | speed | _ Number_ | ` 2 ` | Animation speed |
60+ | width | _ Number_ | ` 400 ` | ** viewBox** width of SVG |
61+ | height | _ Number_ | ` 130 ` | ** viewBox** height of SVG |
62+ | style | _ Object_ | ` null ` | Ex: ` { marginTop: '50px' } ` |
63+ | primaryColor | _ String_ | ` #f3f3f3 ` | Background the SVG |
64+ | secondaryColor | _ String_ | ` #ecebeb ` | Animation color |
65+ | preserveAspectRatio | _ String_ | ` xMidYMid meet ` | Aspect ratio option of SVG |
66+ | className | _ String_ | '' | Classname in the <svg /> |
6767
6868### Examples
6969
7070#### Facebook Style
7171
72+ ``` jsx
73+ // import the component
74+ import { Facebook } from ' react-content-loader'
75+
76+ const MyFacebookLoader = () => < Facebook / >
77+ ```
78+
7279![ Facebook Style] ( https://user-images.githubusercontent.com/4838076/34308760-ec55df82-e735-11e7-843b-2e311fa7b7d0.gif )
7380
7481#### Instagram Style
7582
83+ ``` jsx
84+ // import the component
85+ import { Instagram } from ' react-content-loader'
86+
87+ const MyInstagramLoader = () => < Instagram / >
88+ ```
89+
7690![ Instagram Style] ( https://cloud.githubusercontent.com/assets/4838076/22555637/749f9e26-e94b-11e6-84ff-83cd415c1eb9.gif )
7791
7892#### Code Style
7993
94+ ``` jsx
95+ // import the component
96+ import { Code } from ' react-content-loader'
97+
98+ const MyCodeLoader = () => < Code / >
99+ ```
100+
80101![ Code Style] ( https://cloud.githubusercontent.com/assets/4838076/22555473/effa54c2-e94a-11e6-9128-9b608bcc69d9.gif )
81102
82103#### List Style
83104
105+ ``` jsx
106+ // import the component
107+ import { List } from ' react-content-loader'
108+
109+ const MyListLoader = () => < List / >
110+ ```
111+
84112![ List Style] ( https://user-images.githubusercontent.com/2671660/27986068-7a0040d6-63f9-11e7-8e54-dcb220e42fd7.gif )
85113
86114#### Bullet list Style
87115
116+ ``` jsx
117+ // import the component
118+ import { BulletList } from ' react-content-loader'
119+
120+ const MyBulletListLoader = () => < BulletList / >
121+ ```
122+
88123![ Bullet list Style] ( https://user-images.githubusercontent.com/4838076/31998372-59817bac-b96e-11e7-8ef8-07f61670ee18.gif )
89124
90125#### Custom Style
91126
127+ ** For the custom mode, use the
128+ [ online tool] ( https://danilowoz.github.io/create-react-content-loader/ ) **
129+
130+ ``` jsx
131+ const MyLoader = () => (
132+ < ContentLoader>
133+ {/* Pure SVG */ }
134+ < rect x= " 0" y= " 0" rx= " 5" ry= " 5" width= " 70" height= " 70" / >
135+ < rect x= " 80" y= " 17" rx= " 4" ry= " 4" width= " 300" height= " 13" / >
136+ < rect x= " 80" y= " 40" rx= " 3" ry= " 3" width= " 250" height= " 10" / >
137+ < / ContentLoader>
138+ )
139+ ```
140+
92141![ Code Style] ( https://cloud.githubusercontent.com/assets/4838076/22760218/aa619f32-ee3c-11e6-9cd1-c4af9dd1278e.gif )
93142
94- ## Alternatives
143+ ## Similares
95144
96145* [ React Native] ( https://github.com/virusvn/react-native-svg-animated-linear-gradient ) ;
97146* [ Preact] ( https://github.com/bonitasoft/preact-content-loader ) ;
0 commit comments