Empty state

● Stable · v0.1

What a screen shows before there's any data — the first thing a brand-new user sees. Never a blank screen: an empty state says why it's empty and what to do next, so a first-timer with no data yet still knows their one next step.

In context

9:41

Purpose

Empty state turns "there's nothing here" into "here's how to start". On first run, this is the onboarding — it has to orient the user and hand them a single, concrete action.

Anatomy

  • Icon (optional) — a quiet visual cue for what's missing.
  • Title — what's empty, in plain words ("No sales yet").
  • Description — why it's empty and what happens once it isn't.
  • Action (optional) — the single next step ("Record a sale").

Code

import { EmptyState } from '@daytwo/components'
<EmptyState
title="No sales yet"
description="Record your first sale and it'll show up here."
actionLabel="Record a sale"
onAction={startCapture}
/>

When to use

  • The first run, before the user has entered anything.
  • A list or filter that legitimately has no results yet.

When NOT to use

  • While data is loading — that's a loading state (a skeleton), not empty. Showing "No sales yet" mid-load is a lie that erodes trust.
  • To hide an error — if something failed, say so and offer recovery; don't pretend it's empty.

The correct scenario

A new shop owner opens the sales screen for the first time. Instead of a blank page, they see "No sales yet — record your first sale and it'll show up here," with one teal button. They know exactly what to do without anyone explaining.

Anti-patterns

Do
A clear reason and one concrete next step: 'No sales yet — record your first sale,' with a single button.
Don't
A blank screen, or a lone sad-face icon with no words and no action — the user is left guessing whether it's empty or broken.
Empty is the first impression

For a first-time user, the empty state is the product's first sentence. Make it orient them and offer exactly one next step.

Edge cases

First run
Title + description + one primary action
WhyThis is the de-facto onboarding
Filtered to nothing
Explain the filter, offer to clear it
WhyDifferent from "never had data"
Loading vs empty
Show a skeleton while loading, empty only when truly empty
WhyDon't claim "no data" before data arrives
Long Burmese copy
Text wraps and centres; layout grows
WhyDon't clip the one explanation the user gets

Tokens used

color.text.primarycolor.text.secondarycolor.text.tertiarytypography.title3spacing.32spacing.24