Patterns
Empty, loading and errors
What a screen shows when there is nothing yet, while it waits, and when something goes wrong. In every case the person learns what is happening and what to do next.
Empty
- Use
EmptyState. Itsfirstlayout is a list or a module with nothing in it yet: a mark, a title, one sentence that says what will appear and why it helps, and one action.firstatsize="inline"is the same for a section, in a row.doneis a list some things were in and none are left: a check and a line, nothing else, since nothing is wrong. - Kanso draws the mark as the status marks in their outlined state;
EmptyStatedraws a filled circle with the app's icon in it until its family moves. - A filter that finds nothing is not an empty state: say "Nothing in this view today" in the list's place and offer "Show all".
- Never leave a blank area, and never use illustrations, mascots or emoji.
Loading
- Under one second, show nothing new: keep the old content.
- Over one second, show where the content will go: a
Skeletonin the content's shape, aProgressIndicatorwith a label read out ("Loading items"), or a determinate bar when the length is known (an upload). - Keep the shell, the title and the navigation in place while a section loads.
Errors
- In a field: the field's
error, which draws a critical border, an error icon and the message under the field. Show what fits: "Enter an amount, like 12.50". Validate on submit, then live while the person fixes it. - After an action: a critical inline alert above the form or the list, with what happened, how to fix it and a retry: "Couldn't save the file. Check your connection and try again." InlineAlert is coming.
- A whole screen that cannot load:
EmptyState'sstatuslayout, with the reason in plain words and a button to retry. - Offline: a caution inline alert at the top: "You're offline. Changes save here and sync later."
Rules
- Do keep what the person typed when an error happens.
- Do use critical only for errors, never for money or late items.
- Don't use a
Snackbarfor an error that needs a decision; use an inline alert or aDialog.
Components
EmptyState, Skeleton, ProgressIndicator, InlineAlert (coming), TextField, Snackbar, Dialog.