Empty states
On this page
An empty state fills the space where content would be when there's nothing to show yet. It says why it's empty and offers the next step. The error variant does the same when loading failed.


Figure 1: An empty state with a Refresh button, and an error empty state with Try again
<div class="ph-empty">
<svg class="ph-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">...</svg>
<p class="ph-empty-title">No orders yet</p>
<p class="ph-empty-text">Orders show up here as customers place them.</p>
<button type="button" class="ph-btn">Refresh</button>
</div>
| Class | What it is |
|---|---|
.ph-empty | The centred empty state |
.ph-empty--error | The error variant (red icon) |
.ph-empty-title | What's empty, or what failed |
.ph-empty-text | Why, and what happens next |
Kinds of empty
| Situation | Title | Action |
|---|---|---|
| Nothing has happened yet | "No orders yet" | What makes it fill up, or the first step ("Add customer") |
| Filters or search hide everything | "No customers match" | "Clear filters" |
| Loading failed | "Couldn't load orders" | "Try again" |
Guidelines
- Never leave a blank space or a table with only headers.
- Say what to do, not just that it's empty.
- Charts and data grids have their own empty text (
emptyText). See Charts and Data grid.
Related
- Callouts
- Loading
- Page patterns: loading, empty and error states