# Skeleton: placeholders while loading

> iVOLT skeleton: placeholder blocks shown while content loads, with shimmer animation and reduced-motion fallback. CSS only.

Source: https://ivolt.intervolutions.com/components/skeleton · iVOLT 1.1.2 · English

Placeholder shapes while content loads. Skeletons are decorative: hide them from assistive technology with `aria-hidden="true"` and mark the waiting container with `aria-busy="true"`. Replace them with real content; do not leave them in the DOM.

**CSS:** `css/components/skeleton.css` (in `ivolt.css`).

Couldn't load the demo. [Open alone](https://ivolt.intervolutions.com/stage/skeleton/card.html?id=fx-skeleton-card)

```html
<div class="iv-grid iv-u-gap-4 iv-u-grid-cols-1 iv-u-md-grid-cols-2" aria-busy="true">
  <span class="iv-u-sr-only">Loading the release summary</span>

  <article class="iv-card">
    <div class="iv-skeleton iv-skeleton--rect" aria-hidden="true"></div>
    <div class="iv-card__body iv-stack iv-u-gap-3">
      <div class="iv-skeleton iv-skeleton--title" aria-hidden="true"></div>
      <div class="iv-skeleton iv-skeleton--text" aria-hidden="true"></div>
      <div class="iv-skeleton iv-skeleton--text" aria-hidden="true" style="inline-size: 80%"></div>
    </div>
  </article>

  <article class="iv-card">
    <div class="iv-card__body iv-stack iv-u-gap-3">
      <div class="iv-cluster iv-u-gap-3 iv-u-items-center">
        <div class="iv-skeleton iv-skeleton--circle" aria-hidden="true"></div>
        <div class="iv-stack iv-u-gap-2" style="flex: 1">
          <div class="iv-skeleton iv-skeleton--title" aria-hidden="true"></div>
          <div class="iv-skeleton iv-skeleton--text" aria-hidden="true" style="inline-size: 45%"></div>
        </div>
      </div>
      <div class="iv-skeleton iv-skeleton--text" aria-hidden="true"></div>
      <div class="iv-skeleton iv-skeleton--text" aria-hidden="true"></div>
      <div class="iv-skeleton iv-skeleton--text" aria-hidden="true" style="inline-size: 60%"></div>
    </div>
  </article>
</div>
```

## Modifiers

--text, --title, --circle, --rect. The shimmer uses @keyframes iv-shimmer and is static under prefers-reduced-motion.

## The loading pattern

A skeleton is only half of the pattern. The container that is waiting says so with `aria-busy="true"`, the shapes are hidden from assistive technology, and when the data arrives you replace the shapes and remove the attribute. Screen readers hear the state, not a list of empty boxes.

```
<article class="iv-card" aria-busy="true">
  <div class="iv-card__body iv-stack">
    <span class="iv-skeleton iv-skeleton--title" aria-hidden="true"></span>
    <span class="iv-skeleton iv-skeleton--text" aria-hidden="true"></span>
    <span class="iv-skeleton iv-skeleton--text" aria-hidden="true"></span>
  </div>
</article>
```

Match the shapes to the real content (a circle where the avatar will be, two lines where the text will be) so nothing jumps when it arrives. If loading is quick, do not show a skeleton at all: a flash of grey is worse than a short wait.

## Customising

Locals: `--iv-skeleton-bg`, `--iv-skeleton-highlight` (the sweep, mixed halfway towards the strong border so it shows in both themes) and `--iv-skeleton-radius`. Under `prefers-reduced-motion: reduce` the sweep stops and the shapes stay as flat blocks.

## Class index

Parts and modifiers of this family that the examples above do not show. The full list per stylesheet lives in the [reference](https://ivolt.intervolutions.com/reference).

| Class | What it does |
| --- | --- |
| `iv-skeleton--text` | Line of text: one line height with the text radius. |
| `iv-skeleton--title` | Taller, shorter line, for a heading. |
| `iv-skeleton--rect` | Rectangular block: an image, a card. |
| `iv-skeleton--circle` | Circle, for an avatar. |
