Overview
A status section is a content section or a hero section with the nds-status-section class. It stacks a feedback chip or an illustration, a title, a description and an action row in one centered column. It is a whole page: the page shows nothing else, apart from its hero, such as an error page or a final confirmation page. Content the page hides while the status shows does not count: a page can swap its form for a status section, as Job Apply does. It is also the view a user cannot use: sign in first, no permission, or an item that is not found. It needs no JavaScript.
Pick another component when:
- the message sits inside a form or a region of the page: Alert
- the page shows the outcome with other content, such as a booking above its details: a status Card
- a list or a cart has no items, even when it is all the page shows: Empty
- the status needs only an icon and a line of text: Feedback Icons
Markup
Variants
| Group | Option | Markup | On element | Use |
|---|---|---|---|---|
| Structure | Icon (default) | — | — | A feedback chip above the title. Most outcome messages |
| Structure | Illustration (id: illustration) | canon #status-image |
— | A page with its own artwork, such as the 404 page. It takes no status |
| Status | Success (default) (not: illustration) | — | .nds-status-section |
The work completed. Green check mark |
| Status | Info (not: illustration) | [data-status="info"] |
.nds-status-section |
A plain notice. Blue “i” |
| Status | Warning (not: illustration) | [data-status="warning"] |
.nds-status-section |
The work needs attention. Yellow exclamation mark |
| Status | Error (not: illustration) | [data-status="error"] |
.nds-status-section |
The work failed. Red cross |
| Status | Critical (not: illustration) | [data-status="critical"] |
.nds-status-section |
A failure the user must act on now. Red exclamation mark |
| Status | Help (not: illustration) | [data-status="help"] |
.nds-status-section |
A pointer to help. The chip shows a question mark |
| Chip | Outline | .nds-outline |
.nds-feedback |
The chip shows an outlined icon instead of a solid disc. The ring stays |
| Second action | Second action | canon #status-second-action |
.nds-section-action |
A second way out beside the main one, such as Try Again |
Built-in Features
-
Centered Parts
The section centers its parts with the same rules as a section with
nds-center. It needs no extra class. -
Height Fill
In the page layout, the section grows to fill the height the other sections leave, and it centers its content in that height. A short message on its own page sits in the middle of the screen.
-
Chip Size
A feedback chip in the section is 56px wide, with no size class.
Best Practices
- Put a status section in the page layout, as the only section after the page hero. When the page also shows other content, such as the details of a request, use a status Card instead.
- On a page with tabs, a status section replaces the whole tabs section only when no tab can show its content, such as before sign-in. When one tab fails, put an Alert or Empty in its panel, so the user can still open the other tabs. A section never goes inside a tab panel.
- With no page hero, the title is the page heading: use
h1. Below a page hero, useh2. - Write the outcome in the title and what happens next in the description. Keep both short.
- Pick the status by meaning, not by color:
successfor work that completed,errorfor work that failed,criticalfor a failure the user must act on now,warningfor work that needs attention,infofor a plain notice. - Use an illustration only on a page with its own artwork, and a chip everywhere else. Never use both.
- Put the feedback chip in
nds-section-iconand an illustration innds-section-image, both before the head. - Give an illustration an empty
altwhen the title says the same thing. - Give the user a way out in the action row: back to the home page, back to the service, or try again. Never ship a status page with no link.
- Make one action primary. A second action takes a secondary style.
API
Data Attributes
| Attribute | Element | Effect |
|---|---|---|
data-status |
the .nds-status-section element |
success, info, warning, error, critical or help. Sets the icon and colors of the feedback chip inside the section; the title keeps its own color. The chip carries no status of its own. Leave it out on a section with an illustration |
CSS Custom Properties
| Property | Default | Controls |
|---|---|---|
--feedback-size |
56px |
The diameter of the feedback chip. Set it in the style of the section or of the chip. See Feedback Icons |