You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-16
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,12 @@ This is a Vue port for [react-content-loader](https://github.com/danilowoz/react
20
20
21
21
## Install
22
22
23
+
Note: For Vue 2, use `vue-content-loader@^0.2` instead.
24
+
23
25
```bash
24
26
yarn add vue-content-loader
27
+
# For Vue 2
28
+
# yarn add vue-content-loader@^0.2
25
29
```
26
30
27
31
CDN: [UNPKG](https://unpkg.com/vue-content-loader/) | [jsDelivr](https://cdn.jsdelivr.net/npm/vue-content-loader/) (available as `window.contentLoaders`)
@@ -74,27 +78,25 @@ import {
74
78
75
79
This is also how [ListLoader](./src/ListLoader.js) is created.
76
80
77
-
You can also use the [online tool](http://danilowoz.com/create-vue-content-loader/) to create shapes for your custom loader.
81
+
You can also use the [online tool](http://danilowoz.com/create-vue-content-loader/) to create shapes for your custom loader.
78
82
79
83
## API
80
84
81
85
### Props
82
86
83
-
84
-
|Prop|Type|Default|Description|
85
-
|---|---|---|---|
86
-
|width|number|`400`||
87
-
|height|number|`130`||
88
-
|speed|number|`2`||
89
-
|preserveAspectRatio|string|`'xMidYMid meet'`||
90
-
|primaryColor|string|`'#f9f9f9'`||
91
-
|secondaryColor|string|`'#ecebeb'`||
92
-
|uniqueKey|string|`randomId()`|Unique ID, you need to make it consistent for SSR|
93
-
|animate|boolean|`true`||
94
-
|baseUrl|string|empty string|Required if you're using `<base url="/" />` in your `<head />`. Defaults to an empty string. This prop is common used as: `<content-loader :base-url="$route.fullPath" />` which will fill the SVG attribute with the relative path. Related [#14](https://github.com/egoist/vue-content-loader/issues/14).|
95
-
|primaryOpacity|number|`1`|Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari|
96
-
|secondaryOpacity|number|`1`|Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari|
| uniqueKey | string |`randomId()`| Unique ID, you need to make it consistent for SSR |
96
+
| animate | boolean |`true`||
97
+
| baseUrl | string | empty string | Required if you're using `<base url="/" />` in your `<head />`. Defaults to an empty string. This prop is common used as: `<content-loader :base-url="$route.fullPath" />` which will fill the SVG attribute with the relative path. Related [#14](https://github.com/egoist/vue-content-loader/issues/14). |
98
+
| primaryOpacity | number |`1`| Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari |
99
+
| secondaryOpacity | number |`1`| Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari |
0 commit comments