Sub topic 8
Turning Empty States into Guidance
An empty state is what a screen shows when it has no content yet. A new user opens the inbox, the project list, or the dashboard, and there is nothing to show. This chapter assumes you know what a first-run flow is, what an activation goal is, and the basic UI pieces (screens, buttons, lists). It covers how to turn these blank screens into onboarding that happens inside the product.
Why empty states matter
Every app has empty screens on day one. The user has created nothing, imported nothing, and followed no one. A blank list tells the user nothing about what to do next, and it can look like a bug.
Empty states are useful for onboarding for three reasons:
- The user is already on the screen where the feature lives, so the guidance is in context.
- The next action is obvious: add the first item.
- The guidance disappears once the user has content, so it never nags an experienced user.
This ties directly to your activation goal. If activation means "created a first project," the empty project list is the place where that action should be one click away.
Kinds of empty states
Not every empty screen is the same situation. The right message depends on why the screen is empty.
| Type | Why it is empty | What the screen should do |
|---|---|---|
| First use | The user has never added anything | Explain the value and offer the primary action |
| User cleared | The user finished or deleted everything | Confirm the result, keep the tone light, offer a next step if one exists |
| No results | A search or filter matched nothing | Say what was searched, and offer a way to change or clear it |
| Error or no access | Loading failed, or the user lacks permission | Say what happened and how to retry or request access |
| Not yet available | Data needs time, such as analytics | Say when content will appear and what it depends on |
Treating all five the same is a common mistake. A "Create your first project!" banner is wrong on a search screen that returned no results. It is also wrong on an inbox the user just emptied on purpose.
The parts of a good first-use empty state
A first-use empty state usually has four parts.
- A short headline that names what belongs here, such as "No projects yet."
- One sentence of benefit. Say what the user gets, not how the feature works.
- One primary action, written as a verb phrase: "Create a project."
- An optional secondary path, such as "Import from a file" or "Try a sample project."
An illustration can help the screen feel intentional. It is optional, and it must never replace the text. If the illustration carries meaning, give it a text alternative, or mark it as decorative so screen readers skip it. Chapter 11 covers accessibility in more detail.
Keep to one primary action. If you offer five equal buttons, the user has to choose, and many will choose nothing.
Sample content and templates
Sometimes the blank screen is the problem. A blank canvas, spreadsheet, or dashboard is hard to start from, because the user cannot see what a good result looks like. Three techniques help:
- Templates. Offer a few starting points the user can pick and edit.
- Sample data. Fill the screen with clearly labeled example content so the user can explore the features right away.
- Imports. If the user has data elsewhere, let them bring it in.
Sample data has a risk. If users cannot tell it from their own data, they get confused, or they publish or share it by mistake. Label it ("Sample project") and make it easy to delete in one step. Mark it in the data model, not only in the UI, so it never appears in reports or notifications as real activity.
Sample data also affects measurement. If exploring sample content counts as activation, your funnel will overstate real activation. Decide ahead of time which events count, and exclude sample-data events from your activation metric.
Example: a component that picks the right state
The following TypeScript function chooses which empty state to show. It takes the reasons from the flow chart above, and it returns a small description of what to render. The UI layer can then map each kind to copy and actions.
type EmptyKind = "error" | "no_results" | "cleared" | "first_use";
interface ListContext {
itemCount: number;
loadFailed: boolean;
hasActiveFilter: boolean;
everHadItems: boolean;
}
interface EmptyState {
kind: EmptyKind;
headline: string;
body: string;
primaryAction: string;
}
function emptyStateFor(ctx: ListContext): EmptyState | null {
if (ctx.itemCount > 0) return null; // not empty, show the list
if (ctx.loadFailed) {
return {
kind: "error",
headline: "We couldn't load your projects",
body: "Check your connection and try again.",
primaryAction: "Retry",
};
}
if (ctx.hasActiveFilter) {
return {
kind: "no_results",
headline: "No projects match your filter",
body: "Try a different filter, or clear it to see everything.",
primaryAction: "Clear filter",
};
}
if (ctx.everHadItems) {
return {
kind: "cleared",
headline: "All caught up",
body: "You have no projects right now.",
primaryAction: "New project",
};
}
return {
kind: "first_use",
headline: "No projects yet",
body: "Projects keep your files and tasks together in one place.",
primaryAction: "Create a project",
};
}
console.log(
emptyStateFor({
itemCount: 0,
loadFailed: false,
hasActiveFilter: false,
everHadItems: false,
})?.kind
); // "first_use"The order of the checks matters. An error must win over every other case, because "no projects yet" is false and misleading when the real problem is a failed request. The everHadItems flag has to come from stored state, not from the current screen, so it needs a record that survives sessions. You can reuse the onboarding progress record from the chapter on tracking progress for this.
Connecting empty states to the checklist
Empty states and checklists work well together. A checklist item such as "Create your first project" can link to the project list. When the user arrives, the empty state offers the same action, and completing it ticks the item. The user sees one consistent path instead of two competing prompts.
Avoid duplicating the whole checklist inside each empty state. Each empty state should show only the action that belongs to its own screen.
Edge cases and gotchas
- Loading looks like empty. If you render the empty state while data is still loading, the user sees "No projects yet" for a moment and then the list appears. Show a loading indicator or skeleton first, and render an empty state only after the request finishes successfully.
- Permissions change the right message. A viewer who cannot create projects should not see a "Create a project" button. Show "Ask an admin to add you to a project" instead.
- Returning users. A user who deleted everything a year ago is not new. Do not show the welcome pitch, which is why the cleared state is separate.
- Localization. Headlines that fit in English may wrap or overflow in other languages. Test the layout with longer strings.
- Dismissed guidance. If your empty state includes a tip the user can dismiss, store that dismissal so it does not return on the next visit.
- Offline. An offline app is neither empty nor broken. Say that the content is unavailable offline.
Accessibility and copy checks
Before shipping an empty state, check these points:
- The headline is a real heading, or otherwise exposed as text, so screen readers announce it.
- The primary action is a real button or link with a clear label, not an image.
- When a search returns no results, the change is announced, for example through a polite live region.
- Text contrast is sufficient, since empty states often use pale gray text.
- The copy states what to do, in plain words, without blame ("You haven't added anything" reads as a criticism).
Measuring empty states
Add analytics events so that you can see whether empty states help. Useful events are:
empty_state_viewed, with the screen and the kindempty_state_action_clicked, with the action- the activation event itself, such as
first_project_created
The ratio of views to action clicks shows which empty states work. A high view count with few clicks suggests the copy or the action is unclear. Keep the kind property on every event, so a spike in error states is not mixed in with first-use views.
Exercise
A user opens the "Tasks" screen and sees a large "Create your first task!" prompt. The user has 40 completed tasks but has just applied the filter "Due today", and nothing matches. What is wrong, and what should the screen show instead?
Show answer
The screen shows a first-use state in a no-results situation. The user is not new and has not run out of tasks. The filter produced no matches. It should show a no-results state, for example "No tasks due today," with an action such as "Clear filter." In the decision order, the active-filter check comes before the first-use check, and the flag for whether the user ever had items confirms they are not new.
Exercise
Your app fills a new user's dashboard with sample data. Name two things you should do so that the sample data does not cause problems.
Show answer
First, label it clearly as sample content and make it removable in one step. Second, mark it in the data model and exclude it from activation metrics, reports, and notifications, so exploring sample data is not counted as real activation.