1- # A single div, dynamic, fully customizable CSS library.
1+ # Single div, dynamic, fully customizable CSS library.
2+
3+ [ See full documentation] ( https://dgknca.github.io/css-skeletons/docs/index.html )
24
35## Getting Started
46
7+ ### Use from CDN
8+
9+ ``` html
10+ <!-- UNPKG -->
11+ <link
12+ rel =" stylesheet"
13+ href =" https://unpkg.com/css-skeletons@1.0.1/css/css-skeletons.min.css"
14+ />
15+
16+ <!-- JSDelivr -->
17+ <link
18+ rel =" stylesheet"
19+ href =" https://cdn.jsdelivr.net/npm/css-skeletons@1.0.1/css/css-skeletons.min.css"
20+ />
21+ ```
22+
23+ or
24+
525### Install from NPM
626
727``` js
@@ -12,53 +32,38 @@ npm i css-skeletons
1232import ' css-skeletons'
1333```
1434
15- or
35+ A few example from [ documentation ] ( https://dgknca.github.io/css-skeletons/docs/index.html ) .
1636
17- ### Use from CDN
37+ ``` html
38+ <div
39+ class =" skeleton skeleton-line"
40+ style ="
41+ --lines : 6 ; /* lines count */
42+ --l-h : 10px ; /* line height */
43+ --l-gap : 8px ; /* line gap */
44+ "
45+ ></div >
46+ ```
47+
48+ ![ example 1] ( ./docs/assets/img/skeleton-line.png )
49+
50+ ``` html
51+ <div class =" skeleton skeleton-card-3" ></div >
52+ ```
53+
54+ ![ example 2] ( ./docs/assets/img/skeleton-card-3.png )
1855
1956``` html
20- <link rel =" stylesheet" href =" https://unpkg.com/css-skeletons" />
57+ <div
58+ class =" skeleton skeleton-list no-animate"
59+ style ="
60+ --lines : 5 ;
61+ --bg : #ffb6b67d ;
62+ --c-bg : #ff92922b ;
63+ --bullet-ratio : 1.5 ;
64+ --l-gap : 15px ;
65+ "
66+ ></div >
2167```
2268
23- ## Custom Variables
24-
25- | Custom Variable | Description | Default |
26- | :-------------- | :---------------------------------------------------------------------- | :--------------------: |
27- | --lines | Count of the lines. | 1 |
28- | --l-h | (line-height) Height of the lines. | 20px |
29- | --l-gap | (line-gap) Gap between the lines. | 10px |
30- | --g-gap | (group-gap) Gap between the groups. E.g. circle and other lines. | 15px |
31- | --c-w | (container-width) Width of the container. | 300px |
32- | --c-p | (container-padding) Padding of the container. | 10px |
33- | --bg | Background of the shapes. | #e2e1eb |
34- | --c-bg | (container-background) Background of the container. | transparent |
35- | --shine | Color of the shine animation. | rgba(255,255,255, 0.2) |
36- | --t | Duration of the shine animation. | 2s |
37- | --c-s | (circle-size) Size of the circles. | 40px |
38- | --rect-h | (rectangle-height) Height of the rectangle at the top. | 80px |
39- | --chart-h | (chart-height) Height of the chart. | 200px |
40- | --chart-btm | (chart-bottom) Height of the bottom area of the ".skeleton-chart-line". | 40px |
41- | --cols | Columns count of the ".skeleton-chart-columns". Can be up to 10. | 5 |
42- | --col-w | Width of the columns. | 25px |
43- | --col-gap | Gap between the columns. | 25px |
44- | --card-h | Height of the cards. | 150px |
45-
46- ## Classes
47-
48- | Class | Required Classes/Variables | Valid Variables |
49- | :--------------------------- | :-------------------------: | :----------------------------------------: |
50- | VALID FOR ALL | - | --bg, --c-bg, --c-w, --c-p, --shine, --t |
51- | .skeleton-line | - | --l-h, --lines, --l-gap |
52- | .skeleton-circle | - | --c-s |
53- | .skeleton-circle-line | - | --c-s, --g-gap, --l-gap |
54- | .skeleton-circle--multi-line | - | --c-s, --l-h, --lines, --l-gap, --g-gap |
55- | .adapt-to-circle | .skeleton-circle-multi-line | --c-s, --l-h, --lines, --l-gap, --g-gap |
56- | .skeleton-rect | - | --rect-h, --l-h, --lines, --l-gap, --g-gap |
57- | .skeleton-chart-columns | - | --cols, --col-w, --col-gap, --chart-h |
58- | .skeleton-chart-line | - | --chart-btm, --chart-h |
59- | .skeleton-card-1 | - | --card-h, --g-gap, --c-s |
60-
61- ## TODO
62-
63- - List
64- - Image
69+ ![ example 3] ( ./docs/assets/img/skeleton-list.png )
0 commit comments