Skip to content

Commit cd0de95

Browse files
author
Fernando Costa
committed
responsive support
1 parent 4b667f4 commit cd0de95

File tree

6 files changed

+14702
-16
lines changed

6 files changed

+14702
-16
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This is a Vue port for [react-content-loader](https://github.com/danilowoz/react
1313
- Completely customizable: you can change the colors, speed and sizes.
1414
- Create your own loading: use the [online tool](http://danilowoz.com/create-vue-content-loader/ ) to create your custom loader easily.
1515
- You can use it right now: there are a lot of presets already.
16+
- Responsive rules
1617
- Performance:
1718
- Tree-shakable and highly optimized bundle.
1819
- Pure SVG, so it's works without any javascript, canvas, etc.
@@ -83,8 +84,8 @@ You can also use the [online tool](http://danilowoz.com/create-vue-content-loade
8384

8485
|Prop|Type|Default|Description|
8586
|---|---|---|---|
86-
|width|number|`400`||
87-
|height|number|`130`||
87+
|width|number \| responsiveRules|`400`| |
88+
|height|number \| responsiveRules|`130`||
8889
|speed|number|`2`||
8990
|preserveAspectRatio|string|`'xMidYMid meet'`||
9091
|primaryColor|string|`'#f9f9f9'`||
@@ -95,6 +96,15 @@ You can also use the [online tool](http://danilowoz.com/create-vue-content-loade
9596
|primaryOpacity|number|`1`|Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari|
9697
|secondaryOpacity|number|`1`|Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari|
9798

99+
```javascript
100+
responsiveRules: {
101+
viewBox: 300, // original svg size
102+
'<800': 200,
103+
'<600': 100,
104+
'>900': 280,
105+
'>1000': 400,
106+
}
107+
```
98108

99109
## Credits
100110

0 commit comments

Comments
 (0)