| 1 |
--- |
| 2 |
id: Skeleton |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-skeleton |
| 5 |
---import './Skeleton.css' |
| 6 |
|
| 7 |
## Examples |
| 8 |
|
| 9 |
### Default |
| 10 |
|
| 11 |
```html |
| 12 |
<div class="pf-v6-c-skeleton"> |
| 13 |
<span class="pf-v6-screen-reader">Loading default content</span> |
| 14 |
</div> |
| 15 |
|
| 16 |
``` |
| 17 |
|
| 18 |
### Percentage width modifiers |
| 19 |
|
| 20 |
```html |
| 21 |
<div class="pf-v6-c-skeleton pf-m-width-25"> |
| 22 |
<span class="pf-v6-screen-reader">Loading percentage with modifiers content</span> |
| 23 |
</div> |
| 24 |
<br /> |
| 25 |
<div class="pf-v6-c-skeleton pf-m-width-33"></div> |
| 26 |
<br /> |
| 27 |
<div class="pf-v6-c-skeleton pf-m-width-50"></div> |
| 28 |
<br /> |
| 29 |
<div class="pf-v6-c-skeleton pf-m-width-66"></div> |
| 30 |
<br /> |
| 31 |
<div class="pf-v6-c-skeleton pf-m-width-75"></div> |
| 32 |
<br /> |
| 33 |
<div class="pf-v6-c-skeleton"></div> |
| 34 |
|
| 35 |
``` |
| 36 |
|
| 37 |
### Percentage height modifiers |
| 38 |
|
| 39 |
```html |
| 40 |
<div class="pf-v6-c-skeleton pf-m-height-25"> |
| 41 |
<span class="pf-v6-screen-reader">Loading percentage height modifiers content</span> |
| 42 |
</div> |
| 43 |
<div class="pf-v6-c-skeleton pf-m-height-33"></div> |
| 44 |
<div class="pf-v6-c-skeleton pf-m-height-50"></div> |
| 45 |
<div class="pf-v6-c-skeleton pf-m-height-66"></div> |
| 46 |
<div class="pf-v6-c-skeleton pf-m-height-75"></div> |
| 47 |
<div class="pf-v6-c-skeleton pf-m-height-100"></div> |
| 48 |
|
| 49 |
``` |
| 50 |
|
| 51 |
### Text modifiers |
| 52 |
|
| 53 |
```html |
| 54 |
--pf-v6-global--FontSize--4xl |
| 55 |
<div class="pf-v6-c-skeleton pf-m-text-4xl"> |
| 56 |
<span class="pf-v6-screen-reader">Loading text modifiers content</span> |
| 57 |
</div> |
| 58 |
<br />--pf-v6-global--FontSize--3xl |
| 59 |
<div class="pf-v6-c-skeleton pf-m-text-3xl"></div> |
| 60 |
<br />--pf-v6-global--FontSize--2xl |
| 61 |
<div class="pf-v6-c-skeleton pf-m-text-2xl"></div> |
| 62 |
<br />--pf-v6-global--FontSize--xl |
| 63 |
<div class="pf-v6-c-skeleton pf-m-text-xl"></div> |
| 64 |
<br />--pf-v6-global--FontSize--lg |
| 65 |
<div class="pf-v6-c-skeleton pf-m-text-lg"></div> |
| 66 |
<br />--pf-v6-global--FontSize--md |
| 67 |
<div class="pf-v6-c-skeleton pf-m-text-md"></div> |
| 68 |
<br />--pf-v6-global--FontSize--sm |
| 69 |
<div class="pf-v6-c-skeleton pf-m-text-sm"></div> |
| 70 |
|
| 71 |
``` |
| 72 |
|
| 73 |
### Static height width and shape modifiers |
| 74 |
|
| 75 |
```html |
| 76 |
Small circle |
| 77 |
<div class="pf-v6-c-skeleton pf-m-circle pf-m-width-sm"> |
| 78 |
<span class="pf-v6-screen-reader">Loading circle content</span> |
| 79 |
</div> |
| 80 |
<br />Medium circle |
| 81 |
<div class="pf-v6-c-skeleton pf-m-circle pf-m-width-md"></div> |
| 82 |
<br />Large circle |
| 83 |
<div class="pf-v6-c-skeleton pf-m-circle pf-m-width-lg"></div> |
| 84 |
<br />Small square |
| 85 |
<div class="pf-v6-c-skeleton pf-m-square pf-m-width-sm"> |
| 86 |
<span class="pf-v6-screen-reader">Loading square content</span> |
| 87 |
</div> |
| 88 |
<br />Medium square |
| 89 |
<div class="pf-v6-c-skeleton pf-m-square pf-m-width-md"></div> |
| 90 |
<br />Large square |
| 91 |
<div class="pf-v6-c-skeleton pf-m-square pf-m-width-lg"></div> |
| 92 |
<br />Small rectangle |
| 93 |
<div class="pf-v6-c-skeleton pf-m-height-sm pf-m-width-md"> |
| 94 |
<span class="pf-v6-screen-reader">Loading rectangle content</span> |
| 95 |
</div> |
| 96 |
<br />Medium rectangle |
| 97 |
<div class="pf-v6-c-skeleton pf-m-height-md pf-m-width-lg"></div> |
| 98 |
<br />Large rectangle |
| 99 |
<div class="pf-v6-c-skeleton pf-m-height-lg"></div> |
| 100 |
|
| 101 |
``` |
| 102 |
|
| 103 |
## Documentation |
| 104 |
|
| 105 |
### Usage |
| 106 |
|
| 107 |
| Class | Applied to | Outcome | |
| 108 |
| -- | -- | -- | |
| 109 |
| `.pf-v6-c-skeleton` | `<div>` | Initiates the skeleton component. **Required** | |
| 110 |
| `.pf-m-width-[sm, md, lg, 25, 33, 50, 66, 75]` | `.pf-v6-c-skeleton` | Modifies the width of the skeleton. The default is 100%. | |
| 111 |
| `.pf-m-height-[sm, md, lg, 25, 33, 50, 66, 75, 100]` | `.pf-v6-c-skeleton` | Modifies the height of the skeleton. The default is the inherited font size. | |
| 112 |
| `.pf-m-text-[sm, md, lg, xl, 2xl, 3xl, 4xl]` | `.pf-v6-c-skeleton` | Modifies the skeleton height to match the height of PatternFly's text elements. | |
| 113 |
| `.pf-m-circle` | `.pf-v6-c-skeleton` | Modifies the border radius of the skeleton to be a circle. Use a width modifier to specify the size. | |
| 114 |
| `.pf-m-square` | `.pf-v6-c-skeleton` | Modifies the border radius of the skeleton to be a square. Use a width modifier to specify the size. | |