Empty & Error States

One shape for "there is nothing here" and "we couldn't load this", so both read the same across pages, cards and table bodies.

Reach for EmptyState when a list is genuinely empty, and ErrorState when a request failed. They are separate components on purpose: telling someone they have no items when the fetch merely broke is the one answer that is actually wrong, and it is the easiest mistake to make when both states share a branch.

Resolve the error case before the empty case:

Basic

No reports yet

Reports appear here once you schedule your first one.

With an action

Only offer one when creating the missing thing is actually possible here. A "New report" button on a "nothing shared with you" state is a dead end — nothing the user does on this screen changes that list.

No reports yet

Reports appear here once you schedule your first one.

Without a title

title is optional. On a subdued surface — one tab of a card, a small section — a headline plus a sentence usually says the same thing twice, and the sentence alone carries it. Keep the headline for page-level states, where the empty view has to stand on its own.

ErrorState is the exception: it always renders a headline, falling back to its own copy, because a failure the reader has to infer from one line of tertiary text is a failure they will read as an empty list.

Citations from answer engines appear here after the next prompt run.

Sizes

page stands in for a whole list view, section for a card or one tab of a list, and inline for small containers where reserving height would look wrong.

No prompts tracked yet

size="page"

No prompts tracked yet

size="section"

No prompts tracked yet

size="inline"

Error state

Point onRetry at the query that failed rather than a page reload — reloading discards everything else that loaded fine.

ErrorState renders with role="alert", so screen readers announce the failure. Pass role to override it.

Without a retry

Omit onRetry when there is nothing useful to retry — a crashed section, or a failure the user can only resolve by navigating away.

EmptyState Properties

icon
IconValue

Icon name, descriptor, or node above the title. Size it to match the surface

title
ReactNode

Headline for the state

description
ReactNode

One sentence on what would appear here, or what to do about it

action
ReactNode

Primary action, such as creating the missing thing

size
'page''section''inline'

Vertical room the state takes

Default: section

className
string

Additional classes for the container

ErrorState Properties

onRetry
() => void

Retries the failed work. Omit to render the message without a button

retryLabel
ReactNode

Label for the retry button

Default: Try again

title
ReactNode

Headline for the failure

Default: We couldn't load this

icon
IconValue

Icon above the title

Default: warning

description
ReactNode

One sentence on what failed

size
'page''section''inline'

Vertical room the state takes

Default: section

className
string

Additional classes for the container