Patterns
Empty and first use
What a health surface shows when it has no value, and why the different kinds of nothing must never look alike.
A blank tile, a dash and a "0" are three different assertions. "0 steps yesterday" is not the same fact as "no step data for yesterday".
When to use it
Use it whenever a health surface renders with no value to show.
Do not use it when:
- The data exists but is old. That is Offline and stale data.
- The reader has never opened the product. That is Onboarding and first run.
- A trend has too few points to support a direction. See Trend review.
How it works
A measured zero is a value, shown with its unit. Every other absence renders its reason:
| Kind of nothing | Render | Never imply |
|---|---|---|
| Loading | A skeleton in the final layout's shape | A value |
| Never collected | One sentence of value and exactly one action | Nothing to worry about |
| Nothing in this filter | Say so, and offer to widen it | They stopped logging |
| Pending | What is expected, and by when | It is late or lost |
| Failed to load | An error with a retry | The value is zero or unchanged |
| Withheld | What is off, and how to turn it back on | The data was deleted |
- Never render an absent value as a number: no zero, no dash styled as data, no last-known value dressed as current.
- Never present a failed request as "no data yet". That is a fact about your network, not about the reader.
- Absence has no clinical status, so an empty tile carries no status colour. See Two colour axes.
- Loading has a floor and a ceiling. Never flash a skeleton, and after a stated timeout show an honest error.
Components
- EmptyState requires a
reason:nothing-yet,no-matches,nothing-left,not-enoughorcould-not-load. Onlycould-not-loaddraws a marker of its own, and its action is mandatory. - Skeleton holds the layout while loading, and
appearAfterMsstops it flashing on a fast load. - CareCard says when a pending result is expected.
- MetricTile with
value={null}keeps its label and never shows a zero.
Content
- One fact, one action, one reason: "No blood-pressure readings yet. Log one and we'll show it against your range." "No data" says nothing.
- No jokes about missing health data.
- An error owns the problem: "We couldn't load your readings. This is a problem on our side. Try again."
Accessibility
- The empty state has a heading at the level the content would have had, so the outline keeps its shape.
- Skeletons are
aria-hidden, and the caller mounts one polite status message for the change. An error the reader might act on is announced assertively (WCAG 2.2 SC 4.1.3). - The single action is the first focusable element after the heading.
- Illustrations are decorative, and nothing animates to fill the space.