# Empty state: zero-data screens that guide

> iVOLT empty state: what a list, a table or a search shows when there is nothing yet — an icon with a brand halo, a title, a sentence and the next action.

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

What a list, a table or a search shows when there is nothing to show yet, and what to do about it. A centred block with an icon on a soft brand halo, a title, one sentence and the next action, so the moment reads as designed rather than broken. It is CSS on ordinary markup: the heading is a real heading and the actions are real buttons and links.

**CSS:** `css/components/empty.css` (in `ivolt.css`). **JS:** none. New in 1.1.

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

```html
<div class="iv-grid iv-u-gap-5 iv-u-grid-cols-1 iv-u-lg-grid-cols-2">
  <section class="iv-card">
    <div class="iv-empty">
      <div class="iv-empty__icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h4"/></svg></div>
      <h3 class="iv-empty__title">No invoices yet</h3>
      <p class="iv-empty__text">Invoices appear here once the first billing period closes. You can also create one by hand.</p>
      <div class="iv-empty__actions">
        <button class="iv-button iv-button--primary" type="button">Create an invoice</button>
        <a class="iv-button iv-button--ghost" href="#empty-note">How billing works</a>
      </div>
    </div>
  </section>

  <div class="iv-empty iv-empty--bordered iv-empty--compact">
    <div class="iv-empty__icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2"/></svg></div>
    <h3 class="iv-empty__title">No results for “quarterly”</h3>
    <p class="iv-empty__text">Check the spelling or search all projects instead of this one.</p>
  </div>

  <p class="iv-u-m-0 iv-u-text-sm iv-u-text-muted" id="empty-note">Demo states: there is no billing behind this page and the button creates nothing.</p>
</div>
```

## When to use it

There are three kinds of empty, and each deserves different words:

- **First use** — nothing has been created yet. Explain what will appear here and offer the action that creates the first item (“Create an invoice”).
- **No results** — a search or a filter matched nothing. Repeat what was searched, suggest how to widen it, and offer to clear the filters. The compact, bordered variant fits inside a results panel.
- **Cleared** — the reader finished everything (an empty inbox). A short, positive line is enough; an action is optional.

An empty state is not an error. When loading failed, say so with an [alert](https://ivolt.intervolutions.com/components/alert) and a way to retry; when it is still loading, show a [skeleton](https://ivolt.intervolutions.com/components/skeleton) or a [spinner](https://ivolt.intervolutions.com/components/spinner).

## Anatomy and variants

```
<div class="iv-empty">
  <div class="iv-empty__icon" aria-hidden="true"><svg …></svg></div>
  <h3 class="iv-empty__title">No invoices yet</h3>
  <p class="iv-empty__text">Invoices appear here once the first billing period closes.</p>
  <div class="iv-empty__actions">…</div>
</div>
```

`iv-empty--bordered` draws a dashed frame, for an empty slot inside a page (a drop zone, a column with no cards). `iv-empty--compact` reduces the padding and the icon for panels and sidebars. Both combine. Inside an `iv-card` the plain variant needs no frame of its own.

## Accessibility

- Use the heading level that fits the page outline — `h2` in a main column, `h3` inside a card. The class styles any level.
- The icon is decoration: `aria-hidden="true"`. The title must make sense without it.
- When the empty state replaces results after a search, announce the change: put the result count (“0 results for ‘quarterly’”) in a `role="status"` element near the search field.
- Primary action first in the source order, so the keyboard reaches it first.

## Customising

```
.trash .iv-empty { --iv-empty-tone: var(--iv-color-danger); }
```

Local: `--iv-empty-tone`, the colour of the icon and its halo (the primary by default, so it follows a one-colour theme). The title uses the display tracking of the system and the text is the muted colour at the reading measure.

## Common mistakes

- “No data” and nothing else. Say what is missing and what to do.
- An illustration so large that the action falls below the fold on a phone.
- Using an empty state while the data is still loading: the reader thinks there is nothing and leaves.
- A button that creates nothing. The fixture above says so in its note; your product's buttons should work.

## Class index

Every class of the family. The full list per stylesheet lives in the [reference](https://ivolt.intervolutions.com/reference).

| Class | What it does |
| --- | --- |
| `iv-empty` | The centred block. |
| `iv-empty__icon` | Icon on a brand halo (decorative). |
| `iv-empty__title` | The heading, at any level. |
| `iv-empty__text` | One sentence of explanation. |
| `iv-empty__actions` | Row of actions. |
| `iv-empty--bordered` | Dashed frame for an empty slot. |
| `iv-empty--compact` | Less padding, smaller icon. |
