Skip to content
UX PrinciplesChapter 45 / 57Intermediate12 min read

Onboarding & Empty States

Onboarding UX and empty state rules covering one value moment, a 3 to 5 step checklist, a space budget per account state, and an empty state with a single action.

On this page

1. What is this practice?

Onboarding means the first-run screen, the setup checklist, the product tour and the empty screens a new account sees. All of these are "transient": they are visitors that stay for a few days. So their space and attention must stay limited.

The rules fall into five groups:

GroupRules
GoalName one value moment, reachable in at most 10 interactions and 5 minutes
Checklist shape3 to 5 steps, steps tick themselves from data, "x of n done", steps in any order, only the next step open, each step is one title + one line + one action
SpaceSpace budget based on account state, big setup on its own route, core work is never blocked
LifecycleHiding is remembered across sessions and devices, completion is celebrated once, then it disappears for good
Empty statesThe final frame of the widget, one line about what will appear, at most one action

A value moment is a data event where the user gets real benefit for the first time, such as "first invoice sent" or "first deploy went live". "Viewed the settings page" is not a value moment.

2. Why does it matter?

The numbers from onboarding research are quite harsh. In data from hundreds of companies, setup checklists had an average completion rate of about 19 percent and a median of about 10 percent. In product tours, about two thirds of people finish a 3 step tour, and after 5 steps completion drops below half. Every extra step has a cost.

Nielsen Norman Group research says people skip tutorials, and a tutorial that stands between the user and their task slows the task down without improving performance. Users are "active": they want to do things, not read.

Psychology helps too. Endowed progress effect: in one study, a loyalty card with 2 of 10 stamps already filled was completed by 34 percent of people, while a card with 8 empty stamps was completed by only 19 percent. Goal gradient: people speed up when the goal looks close. Zeigarnik effect: unfinished work stays on the mind. So "1 of 3 done" is motivation in itself.

Also, guidance that the user opens on their own gets used 2 to 3 times more than guidance that is forced on them.

Typical onboardingOnboarding with the rules
9 items, including "choose a theme" and "read the docs"3 items that lead to the value moment
An "I've done this" button when the server can check by itselfThe step ticks itself as soon as the data arrives
All steps open, with code snippets and forms inlineOnly the next step is open, details in a drawer
A 400 px card on top even after 2 of 3A 64 px bar: "2 of 3 done. Next: ..."
Hidden, but it returns on the next loginHide is remembered across sessions and devices
A full-screen welcome tour you must click through firstThe dashboard stays usable, the checklist sits beside it
An "All set" panel that stays on top foreverOne toast, then the checklist disappears

3. When to follow it

LevelHow importantWhy
Learning projectOne line and one action on every empty list. An onboarding flow is not needed yetEvery app has empty states, and an empty screen is the very first thing a user sees
Production codeAll the rules, and the value moment tracked in analyticsA user who does not reach value in the first session often never comes back
Senior levelDefine the value moment, count interactions, measure checklist completionCompletion below 30 percent is a sign of friction, and this is a product-level decision

When to learn it: when you are building an app where users sign up and add their own data. Empty states first, then the checklist.

4. Bad vs good code

Bad checklist

tsx
"use client";

import { useState } from "react";

export function SetupChecklist({ steps }: { steps: Step[] }) {
  const [hidden, setHidden] = useState(sessionStorage.getItem("hideSetup") === "1");
  if (hidden) {
    return <div className="h-32 rounded border p-4">Setup hidden for this session</div>;
  }
  return (
    <div className="fixed inset-0 z-50 bg-black/50">
      {steps.map((step) => (
        <div key={step.id} className="rounded-xl border p-6">
          <h3 className="text-xl">{step.title}</h3>
          <p>{step.longDescription}</p>
          <pre>{step.codeSnippet}</pre>
          <button className="bg-primary">I've done this</button>
        </div>
      ))}
    </div>
  );
}

Good checklist

Steps are built from data, not from the user's click:

ts
export type SetupStep = { id: string; title: string; done: boolean; actionLabel: string; href: string };

export function buildSetupSteps(account: AccountSummary): SetupStep[] {
  return [
    { id: "account", title: "Create your account", done: true, actionLabel: "", href: "" },
    { id: "products", title: "Add your first product", done: account.productCount > 0, actionLabel: "Add products", href: "/products/new" },
    { id: "share", title: "Share your store link", done: account.visitCount > 0, actionLabel: "Copy link", href: "/settings/share" },
  ];
}

The component picks its own size based on state:

tsx
import Link from "next/link";

import { hideSetup } from "./actions";
import { buildSetupSteps } from "./setup-steps";

export function SetupBar({ account }: { account: AccountSummary }) {
  const steps = buildSetupSteps(account);
  const next = steps.find((step) => !step.done);

  if (account.setupHidden || !next) {
    return null;
  }

  const doneCount = steps.filter((step) => step.done).length;

  return (
    <section className="flex h-16 items-center gap-4 rounded-lg border px-4">
      <p className="text-sm font-medium">{doneCount} of {steps.length} done</p>
      <p className="text-sm text-muted-foreground">Next: {next.title}</p>
      <Link href={next.href} className="ml-auto rounded-md bg-primary px-4 py-2 text-primary-foreground">
        {next.actionLabel}
      </Link>
      <form action={hideSetup}>
        <button className="text-sm text-muted-foreground">Hide setup</button>
      </form>
    </section>
  );
}

hideSetup is a Server Action that saves the user's preference in the database, so hiding is remembered on every device and session. The way to bring it back is a fixed place, such as "Setup checklist" in the help menu.

Empty state

Bad: an empty chart axis, or an empty card with three buttons.

tsx
<div className="h-24 rounded-lg border p-4">
  <p>No data</p>
  <button>Import</button>
  <button>Create</button>
  <button>Learn more</button>
</div>

Good: the same size as the loaded widget, one line about what will appear here, one action.

tsx
export function OrdersEmpty() {
  return (
    <section className="flex h-80 flex-col items-center justify-center gap-4 rounded-lg border">
      <p className="text-sm text-muted-foreground">Orders will appear here when customers check out.</p>
      <a href="/settings/share" className="rounded-md border px-4 py-2">Share store link</a>
    </section>
  );
}

Sample or demo data is fine too, as long as it carries a clear "Sample data" label.

What is the difference?

BadGoodRule
fixed inset-0 overlayA bar inside the pageCore work is never blocked
All steps open, snippet inlineOnly the next step, details behind its linkOnly the next step is open
"I've done this" as the primary buttondone comes from dataData ticks the steps
sessionStoragePreference stored on the serverHide is remembered
A placeholder box when hiddenreturn null0 px when hidden
"Create your account" still left to doAlready tickedA head start raises completion
Three buttons in an empty cardOne line, one action, same heightAn empty state teaches one thing

5. How to apply it

The space onboarding gets is decided by the account state. Heights are in the first viewport:

StateDesktop 1440 by 900Phone 390 by 844Shape
0 of n, no data in the accountAt most 50 percent (450 px)At most 60 percent (506 px)The checklist takes the place of the empty widgets, it does not stack on top of them
0 of n, data already existsAt most 25 percent (225 px)At most 25 percent (211 px)Compact card: progress, next step, one action
Some doneOne bar of at most 72 px, or a side rail of at most 320 px wideOne bar of at most 72 px"2 of 3 done", the name of the next step, one button
All doneOne completion message, once, then 0 pxSameGone for good
Dismissed0 px, one entry in the menu to reopenSameLauncher only
How to design onboarding
Name the value moment as a data event
Count interactions from sign-up to it, at most 10 and 5 minutes
Keep only the 3 to 5 steps on that path
Complete every step from data
Apply the space budget based on state
Give every empty widget its final frame, one line and one action

More detail on the remaining rules:

RuleDetail
Primary actionThe one primary button of the first-run screen is the first step toward the value moment
Step budgetAn open step: title of at most 6 words, description of at most one line (90 characters), one action, height of at most 120 px. A code snippet, form or preview goes behind that action, in a drawer, dialog or page
One step openOnly the first unfinished step is open, the rest are one line each (icon, title, status). Opening another closes the first
Progress"x of n done" text + a bar or segments. Auto-completed steps count too. No percentage under 10 items
OrderSteps in any order. Lock only on a real dependency, and the lock explains why in one line
Self-report"I've done this" only when the result cannot show up in the data at all, and it is a secondary button
Separate routeMore than 5 steps, a step with a form of more than 3 fields, or a dashboard that is useless without setup: put setup on its own route (like /setup/payments), and keep only a small bar on the dashboard
Celebrate onceA toast or inline line on the last step, once. No confetti on every visit and no "All done" card that stays forever

The completion message matters because of the peak-end rule: people remember an experience by its best moment and by its ending. A done card that never goes away turns the ending into clutter.

6. Exceptions and common mistakes

SituationWhat to do
A completely empty accountOnboarding may take half the screen, because there is nothing else to show
The product cannot run without an accountThat step comes first, the rest still in any order
The UI itself can be made clearerClear up the UI before building onboarding. A good UI needs less of a tour

Mistake: A welcome tour you must click through before the dashboard

Why? The user came to get work done, skips the tour and does not remember what was shown. The work also starts later.

Better: Render the dashboard widgets next to the checklist or below it. No modal, overlay or route guard should block the core screens.

Mistake: A checklist that tours features

Why? Steps like choose a theme or read the docs do not lead to value, they only make the list longer and completion drops.

Better: Only the 3 to 5 steps on the path to the value moment. The rest goes in the help menu.

Mistake: Hide only for this session

Why? On the next login the checklist is back at full size, and the user feels the app does not listen to them.

Better: Save hide on the server, or at least in localStorage, and reopen from a fixed place.

Mistake: Empty widget is small, the page jumps when data arrives

Why? Layout shift happens and the thing the user was about to click moves away.

Better: The empty state takes the same space as the loaded widget, with one line about what will appear and at most one action.

7. What to learn before and after

Final quick revision

CheckWhat to remember
Value momentA data event, at most 10 interactions and 5 minutes
Steps3 to 5, only on the path to value
CompletionTicked from data, steps already done show as ticked
Progress"x of n done"
SpaceBased on state, a bar of at most 72 px once some are done
Open stepOnly one, at most 120 px, one action
HideRemembered across sessions, reopen from one place, no placeholder
Big setupIts own route
Core workNever blocked
CompletionOne message, then gone
Empty stateFinal size, one line, at most one action