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.

An empty state and an error empty stateAn empty state and an error empty state

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>
ClassWhat it is
.ph-emptyThe centred empty state
.ph-empty--errorThe error variant (red icon)
.ph-empty-titleWhat's empty, or what failed
.ph-empty-textWhy, and what happens next

Kinds of empty

SituationTitleAction
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.