Skip to main content
  1. Docs
  2. Components
  3. Feedback

Empty state

The message where content would be: nothing yet, no results, or an error. DataState picks the right one.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.4
Renders
<div>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A list with nothing in it yet: the first users, the first key.
  • A search with no results.
  • Content that couldn't load.
Not for

02

Anatomy

  1. 1empty-state-icon<svg>24px, sharp, decorative.
  2. 2empty-state-title<p>What's missing; a heading with level.
  3. 3empty-state-description<p>Why, and what to do.
  4. 4empty-state-actions<div>One primary action at most.

03

Do and don't

A way forward
DoWhat's missing, and the action that fills it.
Don'tNothing to do but leave.
Never the raw error
DoWhat couldn't load, that it's safe, and Try again.
Don'tThe server's message: it means nothing to the reader.

04

Content

  • Titles say what's missing: "No users yet", "No users match “priya.s”".
  • Descriptions say why, and what to do, in a sentence.
  • One primary action; a second way in goes under it, as a link.
Next — Empty stateAPI