Skip to content

Loading, empty and error states

What every widget shows before, without, or instead of its data.

Loading, empty and error states

Loading

No campaigns yet

Create one and it shows up here with its numbers.

Nothing matches

No campaigns match Status: Blocked in the last 7 days.

This report did not load

Try again. If it keeps failing, send support the code RPT-504.

Partial data

Today is incomplete

Numbers after 12:00 UTC arrive at 06:00 tomorrow.

No permission

Billing is visible to admins. Ask an admin of your account for access.

Markup
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px">
<section class="xg-card" aria-busy="true" aria-labelledby="st-l">
<h3 class="xg-card__title" id="st-l" style="margin-bottom:12px">Loading</h3>
<div class="xg-stack" aria-hidden="true" style="gap:10px">
<span class="xg-skeleton" style="width:40%;height:30px">
</span>
<span class="xg-skeleton xg-skeleton--block">
</span>
<span class="xg-skeleton">
</span>
<span class="xg-skeleton" style="width:70%">
</span>
</div>
</section>
<section class="xg-card">
<div class="xg-empty" style="padding:24px 8px">
<span class="xg-empty__icon">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M3 11v2a1 1 0 0 0 1 1h2l5 4V6L6 10H4a1 1 0 0 0-1 1Z"/>
<path d="M15.5 8.5a5 5 0 0 1 0 7"/>
<path d="M18.5 5.5a9 9 0 0 1 0 13"/>
</svg>
</span>
<h3 class="xg-empty__title">No campaigns yet</h3>
<p>Create one and it shows up here with its numbers.</p>
<div class="xg-row">
<button class="xg-btn" type="button">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M12 5v14"/>
<path d="M5 12h14"/>
</svg>Create campaign</button>
</div>
</div>
</section>
<section class="xg-card">
<div class="xg-empty" style="padding:24px 8px">
<span class="xg-empty__icon">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M3 5h18l-7 8.5V19l-4 2v-7.5L3 5Z"/>
</svg>
</span>
<h3 class="xg-empty__title">Nothing matches</h3>
<p>No campaigns match Status: Blocked in the last 7 days.</p>
<div class="xg-row">
<button class="xg-btn xg-btn--secondary" type="button">Clear filters</button>
</div>
</div>
</section>
<section class="xg-card">
<div class="xg-empty" style="padding:24px 8px">
<span class="xg-empty__icon" style="background:var(--xg-color-status-error-tint);color:var(--xg-color-status-error-text)">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M12 3 2 20h20L12 3Z"/>
<path d="M12 10v4"/>
<path d="M12 17h.01"/>
</svg>
</span>
<h3 class="xg-empty__title">This report did not load</h3>
<p>Try again. If it keeps failing, send support the code <code>RPT-504</code>.</p>
<div class="xg-row">
<button class="xg-btn" type="button">Try again</button>
</div>
</div>
</section>
<section class="xg-card">
<h3 class="xg-card__title" style="margin-bottom:12px">Partial data</h3>
<div class="xg-alert xg-alert--warning" role="status">
<span class="xg-alert__icon" aria-hidden="true">!</span>
<div class="xg-alert__body">
<p class="xg-alert__title">Today is incomplete</p>
<p>Numbers after 12:00 UTC arrive at 06:00 tomorrow.</p>
</div>
</div>
</section>
<section class="xg-card">
<h3 class="xg-card__title" style="margin-bottom:12px">No permission</h3>
<div class="xg-empty" style="padding:8px">
<span class="xg-empty__icon">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<circle cx="12" cy="12" r="3"/>
<path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z"/>
</svg>
</span>
<p>Billing is visible to admins. Ask an admin of your account for access.</p>
</div>
</section>
</div>

The rules that hold between the parts

  • Every data widget designs five states: loading, first use (empty), no results, error, partial data. Permission-denied where roles apply.
  • Loading keeps the layout: skeletons in the shape of the content, never a full-page spinner.
  • Empty and error states say what happened and offer one next step. Errors include a code support can look up.
  • A failed widget fails alone; the rest of the page keeps working.
  • State is honest: never show zeros for “not loaded yet”, and mark estimates as estimates.

The components it is made of

Nothing on this screen is drawn for it: every part is a component from the kit, used as documented.

  • Skeleton: The shape of content that is on its way, for loads over about 300 ms.
  • Empty state: What a view shows when there is nothing in it yet, nothing matches, or it failed.
  • Alert: A message that stays on the page until its cause is resolved.
  • Button: The action a view exists for: save, create, launch, apply.
  • Card and glass panel: The container: solid cards for data, frosted glass for chrome and hero surfaces.