Skip to content

Commit b18a517

Browse files
committed
Fix readme
1 parent 36d0ecd commit b18a517

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

README.md

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,107 @@
22
<img width="230px" src="https://user-images.githubusercontent.com/4838076/31404417-65822d5e-add2-11e7-90c3-ce8cded1a02e.gif" alt="React Content Loader" title="React Content Loader" />
33
</p>
44

5-
React component that uses SVG to create a collection of loaders which simulates the structure of the content that will be loaded, similar to Facebook cards loaders. **Use the [create-react-content-loader](https://github.com/danilowoz/create-react-content-loader) for your custom loader**
5+
React component that uses SVG to create a collection of loaders which simulates the structure of the
6+
content that will be loaded, similar to Facebook cards loaders. **Use the
7+
[online tool](https://github.com/danilowoz/create-react-content-loader) to create your own custom
8+
loader**
69

7-
If you are looking for [React Native](https://github.com/virusvn/react-native-svg-animated-linear-gradient), [Preact](https://github.com/bonitasoft/preact-content-loader) or [Vue.js](https://github.com/LucasLeandro1204/vue-content-loading)
10+
If you are looking for
11+
[React Native](https://github.com/virusvn/react-native-svg-animated-linear-gradient),
12+
[Preact](https://github.com/bonitasoft/preact-content-loader) or
13+
[Vue.js](https://github.com/LucasLeandro1204/vue-content-loading)
814

915
## Installation
1016

1117
**Using npm:**
18+
1219
```sh
1320
npm i react-content-loader --save-dev
1421
```
22+
1523
**Using Yarn:**
24+
1625
```sh
1726
yarn add react-content-loader --save
1827
```
1928

20-
## You can use it in two ways:
29+
## You can use it in two ways:
2130

2231
**Stylized:** [example](#facebook-style)
32+
2333
```jsx
2434
// import the component
2535
import ContentLoader from 'react-content-loader'
2636

2737
const MyLoader = () => {
28-
return(
29-
<ContentLoader type="facebook" />
30-
)
38+
return <ContentLoader type="facebook" />
3139
}
3240
```
3341

3442
**Or in custom mode:** [example](#custom-style)
43+
3544
```jsx
3645
// import the component
3746
import ContentLoader, { Rect, Circle } from 'react-content-loader'
3847

3948
const MyLoader = () => {
40-
return(
49+
return (
4150
<ContentLoader height={140} speed={1} primaryColor={'#333'} secondaryColor={'#999'}>
4251
<Circle x={195} y={30} radius={30} />
4352
<Rect x={50} y={80} height={10} radius={5} width={300} />
4453
<Rect x={75} y={100} height={10} radius={5} width={250} />
4554
</ContentLoader>
46-
)
55+
)
4756
}
4857
```
4958

50-
5159
## Options
5260

53-
**ContentLoader (wrap) options:**
54-
55-
| Name | Type | Default | Description |
56-
|---|---|---|---|
57-
| style | _Object_ | `null` | Ex: `{ marginTop: '50px' }` |
58-
| type | _String_ | `facebook` | Options: `facebook`, `instagram`, `list`, `bullet-list`, `code` |
59-
| speed | _Number_ | `2` | Animation speed |
60-
| width | _Number_ | `400` | Width component |
61-
| height | _Number_ | `130` | Height component |
62-
| primaryColor | _String_ | `#f3f3f3` | Background the SVG |
63-
| secondaryColor | _String_ | `#ecebeb` | Animation color |
64-
| preserveAspectRatio | _String_ | `xMidYMid meet` | Aspect ratio option of SVG|
65-
61+
| Name | Type | Default | Description |
62+
| ------------------- | -------- | :-------------: | --------------------------------------------------------------- |
63+
| style | _Object_ | `null` | Ex: `{ marginTop: '50px' }` |
64+
| type | _String_ | `facebook` | Options: `facebook`, `instagram`, `list`, `bullet-list`, `code` |
65+
| speed | _Number_ | `2` | Animation speed |
66+
| width | _Number_ | `400` | Width component |
67+
| height | _Number_ | `130` | Height component |
68+
| primaryColor | _String_ | `#f3f3f3` | Background the SVG |
69+
| secondaryColor | _String_ | `#ecebeb` | Animation color |
70+
| preserveAspectRatio | _String_ | `xMidYMid meet` | Aspect ratio option of SVG |
6671

6772
**Custom element options:**
6873

69-
| | x | y | radius | width | height |
70-
|---|---|---|---|---|---|
71-
| **Rect** | _Number_ | _Number_ | _Number_ | _Number_ | _Number_ |
72-
| **Circle** | _Number_ | _Number_ | _Number_ | ||
74+
| | x | y | radius | width | height |
75+
| ---------- | -------- | -------- | -------- | :------: | :------: |
76+
| **Rect** | _Number_ | _Number_ | _Number_ | _Number_ | _Number_ |
77+
| **Circle** | _Number_ | _Number_ | _Number_ | ||
7378

74-
**Use the [create-react-content-loader](https://github.com/danilowoz/create-react-content-loader) for your custom loader**
79+
**Use the [create-react-content-loader](https://github.com/danilowoz/create-react-content-loader)
80+
for your custom loader**
7581

7682
## Examples
7783

7884
#### Facebook Style
85+
7986
![Facebook Style](https://cloud.githubusercontent.com/assets/4838076/22555575/3a90ecee-e94b-11e6-97df-8054e7297bd8.gif)
8087

8188
#### Instagram Style
89+
8290
![Instagram Style](https://cloud.githubusercontent.com/assets/4838076/22555637/749f9e26-e94b-11e6-84ff-83cd415c1eb9.gif)
8391

8492
#### Code Style
93+
8594
![Code Style](https://cloud.githubusercontent.com/assets/4838076/22555473/effa54c2-e94a-11e6-9128-9b608bcc69d9.gif)
8695

8796
#### List Style
97+
8898
![List Style](https://user-images.githubusercontent.com/2671660/27986068-7a0040d6-63f9-11e7-8e54-dcb220e42fd7.gif)
8999

90100
#### Bullet list Style
101+
91102
![Bullet list Style](https://user-images.githubusercontent.com/4838076/31998372-59817bac-b96e-11e7-8ef8-07f61670ee18.gif)
92103

93104
#### Custom Style
105+
94106
![Code Style](https://cloud.githubusercontent.com/assets/4838076/22760218/aa619f32-ee3c-11e6-9cd1-c4af9dd1278e.gif)
95107

96108
#### Credits

0 commit comments

Comments
 (0)