Empty state
What a container shows when it has nothing to show, and the full pages that stand in for a view that cannot be shown: page not found, error, offline, not set up, and expired link.
When to use
- In content (
.oa-empty): a list, table, search result, or section with nothing in it yet, or nothing that matches: "No people match these filters", "No jobs for “sales manager”", "There are no stations yet" (D-CSN-30). - Full page (
.oa-state-page): the page does not exist (404), the server failed (500), there is no network (offline, served from the cached shell), the device is not set up (a station), or a one-time link has expired or was used (canonical §10.24, §11 row 9).
When not to use
| Situation | Use instead |
|---|---|
| A failure the person can fix on the same screen ("That email or password isn’t right.") | An error banner |
| Content that is still loading | Skeleton blocks or a spinner with words |
| A feature that is not built | A dashed placeholder card with "Coming soon" and a warning status, no action (canonical §12.5) |
| A confirmation | A snackbar |
| A framework's default 404 or error page | Never: every product ships these pages in its own shell (canonical §10.24) |
Anatomy
In content (.oa-empty), a centered column:
- Disc (
.oa-empty__disc): a 64px (tile-xl)secondary-containerdisc holding a 32px (icon-2xl) icon inon-secondary-container; or a product illustration of 160px or less (.oa-empty__art) (D-CSN-30, D-ARC-23). - Title (
.oa-empty__title):title-lg(D-ARC-21). - Body (
.oa-empty__body):body-mdinon-surface-variant, 40 characters wide at most. - Actions (
.oa-empty__actions): one action, then an optional text link.
Full page (.oa-state-page), a centered column up to the form width:
- Icon (
.oa-state-page__icon): a bare 64px (icon-4xl) icon inprimary-ink; or, for problem states, a disc (.oa-state-page__disc): an 80px (tile-2xl) tonal disc holding a 40px (icon-3xl) icon (D-ARC-23). - Title (
.oa-state-page__title): the page'sh1inheadline-md(D-ARC-21). - Body (
.oa-state-page__body):body-lginon-surface-variant. - Actions (
.oa-state-page__actions): one filled large button, full width below 640px, then an optional quieter action. - Error code (
.oa-state-page__code): last and small; the code itself infont-mono text-code-xs.
Variants
| Variant | Use for | Key tokens |
|---|---|---|
| In content, in the container it replaces | An empty table region or list | disc --color-secondary-container / --color-on-secondary-container, --size-tile-xl, --size-icon-2xl |
| In content, in a dashed placeholder card | Nothing found where cards would be | the card's 1px dashed --color-outline-variant edge, --radius-card (D-CSN-06) |
| Full page, bare icon | 404, error, offline | --size-icon-4xl, --color-primary-ink |
| Full page, problem disc | Not set up, expired link | --size-tile-2xl disc in --color-warning-container with a --size-icon-3xl icon in --color-on-warning-container |
Full-page copy
The binding copy (canonical §11). Write the apostrophes typographically (canonical §12.2).
| Page | Icon | Title | Sentence | Primary | <title> |
HTTP |
|---|---|---|---|---|---|---|
| 404 | unknown_document |
We couldn’t find that page | The link may be broken, or the page may have been removed. | Go to the home page | Page not found · {Product} | 404 |
| Error | error |
Something went wrong | Try again in a moment. If it keeps happening, contact us. | Try again (+ "Contact us") | Something went wrong · {Product} | 500 |
| Offline | cloud_off |
You’re offline | Check your connection, then try again. | Try again (with refresh) |
You’re offline · {Product} | — |
| Not set up | devices |
This device is not a station yet | An admin gives you a one-time code to set it up. | Set up this station | — | — |
| Expired link | link_off |
This link has expired | Ask the ID office for a new one. | Request a new link, when the product can send one; otherwise Go to the home page | This link has expired · {Product} | — |
- The offline page is part of the cached shell; Global ID adds a tonal "Show my pass" when the phone holds a pass (D-BCP-24).
- The expired-link row comes from R-17 and R-51, which add it to canonical §11. It is built from Global ID's shipped link messages ("This link has expired. Ask the ID office for a new one."), the problem-state disc of the tokens (
tile-2xl: "not set up, expired link"), and Global ID's expired-reset page, whose strings an expired reset link uses: the heading "Request a new reset link" and the button "Send a new reset link". Products name who issues their links ("Ask the ID office", or the product's own help). - "—" in the HTTP column: the offline page comes from the service worker, the station and link pages answer on their own routes.
Sizes
| Size | Height | Padding | Type style | Icon size |
|---|---|---|---|---|
| In content | from its content | 48px block, 24px inline (px-6 py-12); 12px between parts |
title title-lg; body body-md |
disc 64px (tile-xl), icon 32px (icon-2xl) |
| Full page | from its content, centered in the window when the page is short | 40px block (py-10); 16px between parts; column up to 460px (max-w-form) |
title headline-md; body body-lg; code code-xs |
bare icon 64px (icon-4xl); disc 80px (tile-2xl) with a 40px icon (icon-3xl) |
Canonical gives the full-page column as "up to 448px"; the system token for this column is --container-form (460px), whose use already covers "install, offline and empty-state columns", so the reference CSS uses it.
Tokens
| Part | Property | Token |
|---|---|---|
| Empty | padding, gap | --space-12 (48px) block, --space-6 (24px) inline; gap --space-3 (12px) |
| Empty disc | size, fill, icon | --size-tile-xl, --color-secondary-container, icon --size-icon-2xl in --color-on-secondary-container, FILL 1 |
| Empty title | type | --text-title-lg |
| Empty body | type, color, width | --text-body-md, --color-on-surface-variant, 40ch |
| Empty actions | gap | --space-3, 4px (--space-1) more above |
| Illustration | size | 160px at most (a component constant) |
| State page | width, padding, gap | --container-form, --space-10 (40px) block, --space-4 (16px) |
| State icon | size, color | --size-icon-4xl, --color-primary-ink (FILL 1 only for the error glyph) |
| State disc | size, fill, icon | --size-tile-2xl, --color-warning-container, icon --size-icon-3xl in --color-on-warning-container, FILL 1 |
| State title | type | --text-headline-md |
| State body | type, color | --text-body-lg, --color-on-surface-variant |
| State actions | gap | --space-3 (12px) |
| Error code | type | the line --text-body-sm in --color-on-surface-variant; the code --font-mono with --text-code-xs |
States
| State | What changes |
|---|---|
| Static | Neither the empty state nor the page is interactive; its buttons and links have their own states (button, link). |
| Below 640px | Full-page actions stack: the main button spans the column, the quieter action keeps its width under it. |
| From 640px | The actions sit side by side in a centered row, the main one first. |
| Reduced motion | Nothing moves; there is no entrance animation. |
Behavior
- In content. The empty state replaces the content inside its container: a table region keeps its frame, a list keeps its place. Where cards would be, it is a dashed placeholder card: put
.oa-emptyon the card itself (class="oa-card oa-card--dashed oa-empty") so the empty state's padding replaces the card's. - Title level. The title is a heading only when it is the section's one heading (
h2orh3to fit the outline); when the section already has its heading, it is a paragraph (<p>) (D-CSN-30). - One way out. The action is outlined medium (
.oa-btn--outlined), or filled large when it is the screen's main action ("Add a station"), never both; a text link may follow. - Full page, in the shell. The page keeps the product's header (the lock-up leads home) and footer; the state column sits in the page frame (
.oa-container, which holds the 16/24px gutters) inside<main>, so the full-width phone button stops at the gutter. It is centered, and vertically centered when the page is short: it takesmargin-block: auto, with<main>and the frame as flex columns that fill the height. Itsh1is the state. - HTTP and title. The status stays correct (404 for a missing page, 500 for a server error) and the document title names the state: "Page not found · Global Jobs" (canonical §10.24, §12.2).
- No default pages. Each framework's own not-found and error pages are replaced: in Next.js,
app/not-found.tsxandapp/error.tsxinside the shell's layout. - Offline. The service worker keeps the offline page in its cache at install, so it needs nothing from the network; it holds nothing about the person; "Try again" reloads the page that was asked for.
- Focus. On a route change into a state page, focus moves to the
h1(canonical §13).
Accessibility
- Headings. One
h1per full page, the state; empty-state titles fit the outline or are paragraphs. - Icons and discs. Decorative and hidden from screen readers; the title and sentence carry the state.
- Error code. Real text the person can copy, in
<code dir="ltr" translate="no">. - Contrast. Disc icons:
on-secondary-containeronsecondary-container13.17:1 light, 7.22:1 dark;on-warning-containeronwarning-container13.25:1 and 7.22:1; the bare icon inprimary-inkis 5.45:1 or more on the page. Body text inon-surface-variantis 7.2:1 or more light and 5.4:1 or more dark. - Targets. The main button is 56px, an outlined button 48px, a standalone link 48px.
RTL and languages
- The column is centered; actions follow the reading direction, so the main button is at the inline start (right in Arabic) when they share a row.
- None of these glyphs mirror:
unknown_document,error,cloud_off,devices,link_off,search_off,refresh(canonical §8.3). - French titles wrap and stay balanced at 360px ("Cet appareil n’est pas encore une station"); never truncate.
| English | Arabic | French |
|---|---|---|
| You’re offline | أنت غير متصل بالإنترنت | Vous êtes hors ligne |
| Check your connection, then try again. | تحقق من اتصالك ثم حاول مرة أخرى. | Vérifiez votre connexion, puis réessayez. |
| Try again | إعادة المحاولة † | Réessayer |
| Show my pass | عرض تصريحي | Afficher mon pass |
| This device is not a station yet | هذا الجهاز ليس محطة بعد | Cet appareil n’est pas encore une station |
| An admin gives you a one-time code to set it up. | يعطيك المسؤول رمزًا لمرة واحدة لضبطه. | Un administrateur vous donne un code à usage unique pour le configurer. |
| This link has expired. Ask the ID office for a new one. | انتهت صلاحية هذا الرابط. اطلب رابطًا جديدًا من مكتب الهوية والوصول. | Ce lien a expiré. Demandez-en un nouveau au Bureau de l’identité et des accès. |
| Request a new reset link (an expired reset link's heading) | اطلب رابط إعادة تعيين جديدًا | Demandez un nouveau lien |
| Send a new reset link (its button) | إرسال رابط إعادة تعيين جديد | Envoyer un nouveau lien |
| No people match these filters | لا يوجد أشخاص يطابقون عوامل التصفية هذه | Aucune personne ne correspond à ces filtres |
| Clear filters | مسح عوامل التصفية | Effacer les filtres |
These ship in Global ID; "إعادة المحاولة" (marked †) is the glossary's verbal noun and waits for native review, where Global ID's offline button says "حاول مرة أخرى" today. The tanween sits on the letter before the alif ("رمزًا", "رابطًا جديدًا", canonical §12.6), where Global ID writes it on the alif today ("رمزاً", "رابطاً جديداً"), a migration item for native review. The reset-link strings ship with the tanween already in place. The 404 and error pages have no Arabic or French in the products yet: each product writes them and sends them to native review (canonical §12.6).
Content
- In content: the state, why, one way out (canonical §12.4). The title names the state and takes no full stop ("No people match these filters"); the body says what to try ("Try another type, unit, or status, or check the spelling of the name."); the action names its result ("Clear filters", "See all jobs", "Add a station").
- Full page: the copy table above, word for word; the title names the state; a sentence says what to do; the error code comes last and small ("Error code: invalid_request").
- Never "Oops", humor, blame, a bare "404" as the headline, or "Something went wrong" without a next step (D-BCP-20).
Do and don't
| Do | Don't |
|---|---|
| Show the 404 inside the product's header and footer with HTTP 404 | Ship the framework's default page, or answer 200 |
"We couldn’t find that page" as the h1 |
A 144px "404" numeral as the headline |
| Name the state in the document title ("Page not found · Global Jobs") | Keep the home page's title |
| One outlined action in an empty table ("Clear filters") | A filled and an outlined button of unequal heights side by side |
A 64px disc in secondary-container with a 32px icon |
A 40px orange icon, or a 48px peach disc |
| Put the error code last, in small mono text | Lead with the code, or hide it |
Code
HTML (reference CSS)
In content, in a dashed placeholder card:
<div class="oa-card oa-card--dashed oa-empty">
<span class="oa-empty__disc" aria-hidden="true"><span class="oa-icon oa-icon--2xl oa-icon--filled" translate="no">search_off</span></span>
<p class="oa-empty__title">No jobs for “sales manager”</p>
<p class="oa-empty__body">Try another word. Check the spelling, or use a shorter or more general word, like “sales” or “nurse”.</p>
<div class="oa-empty__actions">
<a class="oa-btn oa-btn--outlined" href="#fb-jobs">See all jobs</a>
</div>
</div>In content, inside a table region:
<div class="oa-table-region oa-empty">
<span class="oa-empty__disc" aria-hidden="true"><span class="oa-icon oa-icon--2xl oa-icon--filled" translate="no">search_off</span></span>
<p class="oa-empty__title">No people match these filters</p>
<p class="oa-empty__body">Try another type, unit, or status, or check the spelling of the name.</p>
<div class="oa-empty__actions">
<button type="button" class="oa-btn oa-btn--outlined">Clear filters</button>
</div>
</div>Full page, 404:
<div class="oa-state-page">
<span class="oa-icon oa-icon--4xl oa-state-page__icon" aria-hidden="true" translate="no">unknown_document</span>
<h1 class="oa-state-page__title">We couldn’t find that page</h1>
<p class="oa-state-page__body">The link may be broken, or the page may have been removed.</p>
<div class="oa-state-page__actions">
<a class="oa-btn oa-btn--filled oa-btn--lg" href="#fb-home">Go to the home page</a>
</div>
</div>Full page, error with a code:
<div class="oa-state-page">
<span class="oa-icon oa-icon--4xl oa-icon--filled oa-state-page__icon" aria-hidden="true" translate="no">error</span>
<h1 class="oa-state-page__title">Something went wrong</h1>
<p class="oa-state-page__body">Try again in a moment. If it keeps happening, contact us.</p>
<div class="oa-state-page__actions">
<button type="button" class="oa-btn oa-btn--filled oa-btn--lg">Try again</button>
<a class="oa-link oa-link--standalone" href="#fb-contact"><span class="oa-link__label">Contact us</span></a>
</div>
<p class="oa-state-page__code">Error code: <code dir="ltr" translate="no">invalid_request</code></p>
</div>Full page, a problem state:
<div class="oa-state-page">
<span class="oa-state-page__disc" aria-hidden="true"><span class="oa-icon oa-icon--3xl oa-icon--filled" translate="no">devices</span></span>
<h1 class="oa-state-page__title">This device is not a station yet</h1>
<p class="oa-state-page__body">An admin gives you a one-time code to set it up.</p>
<div class="oa-state-page__actions">
<button type="button" class="oa-btn oa-btn--filled oa-btn--lg">Set up this station</button>
</div>
</div>The offline page, the expired link, the "Add a station" empty state, and the Arabic examples are in reference/snippets/feedback.html; a complete 404 in the shell is reference/templates/not-found.html.
Tailwind CSS v4
In content:
<div className="flex w-full flex-col items-center gap-3 px-6 py-12 text-center">
<span aria-hidden="true" className="flex size-16 shrink-0 items-center justify-center rounded-full bg-secondary-container text-on-secondary-container">
<Icon name="search_off" size={32} filled />
</span>
<p className="text-title-lg text-balance text-on-surface">No people match these filters</p>
<p className="max-w-[40ch] text-body-md text-pretty text-on-surface-variant">Try another type, unit, or status, or check the spelling of the name.</p>
<div className="mt-1 flex flex-wrap items-center justify-center gap-3">
<Button variant="outlined">Clear filters</Button>
</div>
</div>Full page:
<div className="mx-auto my-auto flex w-full max-w-form flex-col items-center gap-4 py-10 text-center">
<Icon name="cloud_off" size={64} className="text-primary-ink" />
<h1 className="text-headline-md text-balance text-on-surface">You’re offline</h1>
<p className="text-body-lg text-pretty text-on-surface-variant">Check your connection, then try again.</p>
<div className="flex w-full flex-col items-center gap-3 sm:flex-row sm:flex-wrap sm:justify-center">
<Button variant="filled" size="lg" icon="refresh" className="self-stretch sm:self-auto">Try again</Button>
<Button variant="tonal" size="lg" icon="qr_code_2" href="/pass">Show my pass</Button>
</div>
</div>Problem states replace the icon with <span aria-hidden="true" className="flex size-20 shrink-0 items-center justify-center rounded-full bg-warning-container text-on-warning-container"><Icon name="devices" size={40} filled /></span>; the error code is <p className="text-body-sm text-on-surface-variant">Error code: <code dir="ltr" translate="no" className="font-mono text-code-xs">invalid_request</code></p>.
React
EmptyState:
| Prop | Type | Default | Description |
|---|---|---|---|
icon |
string |
— | The disc's Material Symbols name (search_off, devices). |
art |
ReactNode |
— | A product illustration of 160px or less, in place of the disc. |
title |
string |
— | Names the state, no full stop. |
titleAs |
"h2" | "h3" | "p" |
"p" |
A heading only when it is the section's one heading. |
children |
ReactNode |
— | The body: what to try. |
action |
ReactNode |
— | One button: outlined medium, or filled large when it is the screen's main action. |
link |
ReactNode |
— | An optional text link after the action. |
StatePage:
| Prop | Type | Default | Description |
|---|---|---|---|
icon |
string |
— | The glyph from the copy table. |
problem |
boolean |
false |
Draws the 80px tonal disc instead of the bare icon (not set up, expired link). |
title |
string |
— | The h1. |
children |
ReactNode |
— | The sentence. |
primary |
ReactNode |
— | The filled large button. |
secondary |
ReactNode |
— | An optional quieter action. |
code |
string |
— | An error code, shown last. |
// app/not-found.tsx, rendered inside the shell's layout with HTTP 404
export const metadata = { title: "Page not found · Global Jobs" }
export default function NotFound() {
return (
<StatePage
icon="unknown_document"
title="We couldn’t find that page"
primary={<Button variant="filled" size="lg" href="/">Go to the home page</Button>}
>
The link may be broken, or the page may have been removed.
</StatePage>
)
}