Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add responsive support #18 #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a Vue port for [react-content-loader](https://github.com/danilowoz/react
- Completely customizable: you can change the colors, speed and sizes.
- Create your own loading: use the [online tool](http://danilowoz.com/create-vue-content-loader/ ) to create your custom loader easily.
- You can use it right now: there are a lot of presets already.
- Responsive rules
- Performance:
- Tree-shakable and highly optimized bundle.
- Pure SVG, so it's works without any javascript, canvas, etc.
Expand Down Expand Up @@ -83,8 +84,8 @@ You can also use the [online tool](http://danilowoz.com/create-vue-content-loade

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

```javascript
responsiveRules: {
viewBox: 300, // original svg size
'<800': 200,
'<600': 100,
'>900': 280,
'>1000': 400,
}
```

## Credits

Expand Down