An open API service indexing awesome lists of open source software.

https://github.com/kyle-west/element-skeleton

Like a loading spinner, but visually more satisfying and dynamic. See the demo:
https://github.com/kyle-west/element-skeleton

Last synced: 3 months ago
JSON representation

Like a loading spinner, but visually more satisfying and dynamic. See the demo:

Awesome Lists containing this project

README

        

# element-skeleton

`element-skeleton` serves the same purpose as a loading spinner, only with more
customization. The purpose of this library is to provide a simple, pulsating style
to any empty DOM element - indicating that content is loading. Once content is
populated to that element, the skeleton will go away.


```html

Will not show a skeleton



```

Will not show a skeleton




This library is intended to be extremely light-weight, and so there are only a
few basic classes provided to give a few general shapes you might need to
serve as a styling base.



# Installing

A regular `` stylesheet will work for most applications.

```html

```

If you need to include `element-skeleton` in a Web Component, Polymer Element,
or template, use the following. (Note the `.html` instead of `.css` in the filename)

```html

...



...
```



# Out-of-the-box Classes

Use the following classes in combination with your own CSS to size and shape
things to you need.


```html





```











# Use DOM Elements to size things

`element-skeleton` uses `1em` for the height size, this way it matches whatever
element you put it on.


```html








```











# Changing Colors

Color can be changed by changing the background like in the example. Unfortunately changing
the color often discards the `background-size` property, so you have to restate
it. By default we reccomend `background-size: 300% 300%;`.


```html

*[element-skeleton]:empty.red {
background: linear-gradient(130deg, red, white);
background-size: 300% 300%;
}


```

*[element-skeleton]:empty.red {
background: linear-gradient(130deg, red, white);
background-size: 300% 300%;
}