Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Chalarangelo/mocka
Simple, elegant content placeholder
https://github.com/Chalarangelo/mocka
css placeholder
Last synced: 3 months ago
JSON representation
Simple, elegant content placeholder
- Host: GitHub
- URL: https://github.com/Chalarangelo/mocka
- Owner: Chalarangelo
- License: mit
- Created: 2017-05-24T10:00:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-26T11:25:31.000Z (over 7 years ago)
- Last Synced: 2024-05-22T16:32:16.367Z (6 months ago)
- Topics: css, placeholder
- Language: CSS
- Homepage: https://chalarangelo.github.io/mocka/
- Size: 46.9 KB
- Stars: 1,191
- Watchers: 16
- Forks: 41
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mocka
Simple, elegant content placeholder![Mocka](/docs/demo.gif)
```
npm install mocka-placeholder
```## Introduction
The **mocka** placeholder is a very simple content placeholder that you can use for your website or web application, while loading your page's content. It weighs very little (about 500 bytes minified and gzipped), is fully customizable and you can easily include it in your project's CSS file, by using the Sass mixin provided. Alternatively, you can copy its code and inline it in your HTML for even faster loading.
## Usage
After loading the css, you can create a placeholder using the code provided below:
```html
```## Customization
Download the npm package, add the mixin to your project, then `@import` the file and `@include` the mixin, passing a single map as an argument. The map contains all the information needed to generate the classes from the mixin. You can find the map with the default values in the [mocka.scss](https://github.com/Chalarangelo/mocka/blob/master/src/mocka/mocka.scss) file.
## License
**Mocka** is an open-source Sass/CSS component and is licensed under the [MIT License](https://github.com/Chalarangelo/mocka/blob/master/LICENSE).