Skip to content

Signal

Components

Empty state

Nothing to show and nothing failed: glyph, title, one line of guidance and at most one primary action.

Contract

Contract: components/empty-state.yaml. States are drawn live by transit.js.

Variants

Two forms: a message (title and guidance) and a prompt (the same with one primary action, such as Turn on location). Nothing else exists. On the web the message is a .ct-card.ct-card--empty.

<!-- Do -->
<div class="ct-card ct-card--empty"><b>No favorites yet</b>Star a stop to keep it here.</div>
<!-- Don't: a failure in an empty state; use an error state -->
<div class="ct-card ct-card--empty"><b>Couldn't load arrivals</b>Something went wrong.</div>

Usage

Do

  • Say what is missing and how to fill it.
  • Offer at most one primary action.

Don't

  • Don't use it for a failure; that is an error state.

Accessibility

  • The title is a heading; the message follows it; the action is a button.