Skip to content

Designing Empty States and Error Messages

UI/UX Design6 min read

How to design empty states and error messages that guide users: clear wording, useful next steps, accessible markup and examples to follow.

In this article
  1. Why these screens matter
  2. The kinds of empty state
  3. Designing a helpful empty state
  4. Anatomy of a good error message
  5. Choose the right place and format
  6. Make them accessible
  7. Handle the technical side too
  8. Common mistakes
  9. What to do next

A good empty state tells people what the space is for and gives them a clear next step. A good error message says what went wrong, where, and exactly how to fix it, in plain words and without blame. Both are moments when a user is uncertain, so careful wording and a helpful action can turn a dead end into a smooth path forward. This guide shows how to design each, with patterns and examples you can adapt.

Why these screens matter

Teams spend most of their design effort on the ideal screen full of data, yet many people first meet your product when it has no data at all. And at some point everyone hits an error. These are the screens that decide whether a new user keeps going or leaves, and whether an experienced user trusts the product when something breaks.

They are also commonly forgotten during build, because they never appear in the mock-ups. The remedy is to design them on purpose and to list them in your handoff. Our design-to-developer handoff checklist includes empty, error and loading states for exactly this reason.

The kinds of empty state

Not all empty screens are the same, and the right response depends on why the space is empty.

TypeExampleWhat to do
First useA new account with no projectsExplain the value and offer one clear first action
User clearedAn inbox with every message handledConfirm completion, keep it brief and positive
No resultsA search or filter that matches nothingSay so, show what was searched, and suggest changes
No permissionA section the person cannot accessExplain why and who can grant access
Not loadedData failed to arriveTreat it as an error with a retry, not as emptiness

The last row matters. Showing "No items" when the real problem is a failed request misleads people into thinking their data has gone. Always distinguish genuinely empty from failed to load.

Designing a helpful empty state

A solid empty state usually has four parts: a short heading, a line of explanation, a primary action, and optionally a supporting visual or secondary link.

  1. Heading. Name what is missing in plain terms: "No projects yet".
  2. Explanation. One sentence on what this area is for and why it will be useful: "Projects let you group tasks and share them with your team."
  3. Primary action. A specific button such as "Create your first project". Avoid vague labels like "Get started" when something more exact is possible.
  4. Supporting help. A link to a short guide, a sample, or an import option if people often arrive with existing data.

Keep illustrations modest. A friendly image can help, but it should never push the action off a small screen or add heavy page weight. On phones, check that the heading and button remain visible without scrolling; see mobile-first responsive design principles for layout thinking that helps here.

For a no-results state, be even more practical. Echo the search term, suggest removing a filter, check spelling, or offer popular alternatives. Better still, offer a one-click way to clear all filters. Never leave the person staring at an empty table with no explanation.

Anatomy of a good error message

Whether it appears beside a field, in a banner or on a full page, a useful error message answers three questions.

  • What happened? State the problem in everyday language.
  • Why, if it helps? A short reason can reduce anxiety, such as "Your session expired for security".
  • What can I do now? Give a concrete step: retry, edit a field, contact support, or return to a safe place.

Compare these pairs.

  • Poor: "Something went wrong." Better: "We could not save your changes because the connection dropped. Your edits are still here. Try saving again."
  • Poor: "Invalid password." Better: "That password does not match. Check for typos or reset your password."
  • Poor: "Error 404." Better: "We could not find that page. It may have moved. Try the search or return to the home page."

Avoid blame ("You entered an invalid date") in favour of guidance ("Enter the date as DD/MM/YYYY"). Avoid jargon, stack traces and uppercase warnings. And be careful about security: a login error should not reveal whether an email address has an account. Our guide to how to build a secure login system explains why vague, consistent wording is the safer choice there.

Choose the right place and format

Where an error appears should match its scope.

  • Inline, beside the field, for validation problems the person can fix right there.
  • A summary at the top of a form, linking to each problem field, for submissions with several errors.
  • A banner or toast, for system-wide issues or background failures. Do not let important errors disappear on a timer; people may not have time to read them.
  • A full-page message, for situations where the person cannot continue, such as a 404, an outage or a permissions block.

Keep the person's work intact wherever possible. If a submission fails, retain what they typed. If a save fails, keep the draft. Offering a safe route out, such as a link to the home page, support or the previous step, prevents dead ends. For forms specifically, see form design best practices.

Make them accessible

An error that only some people can perceive is not much of an error message.

  • Do not rely on colour alone. Pair red with an icon and with text.
  • Announce changes. Use an appropriate live region, such as role="alert" for urgent messages, so screen readers read them out.
  • Link the message to the field with aria-describedby and mark the field with aria-invalid.
  • Move focus sensibly. After a failed submit, send focus to the error summary or first invalid field.
  • Check contrast. Error text must meet the WCAG 2.2 contrast requirements; confirm current criteria on the W3C site.
  • Keep messages visible long enough for people who read slowly or use assistive technology.

The checks are not complicated, but they need doing deliberately. Our article on web accessibility basics for developers goes through them in more detail.

Handle the technical side too

Good messages depend on good behaviour behind the scenes. A few engineering points support the design.

  • Use proper status codes. A real 404 page should return a 404 status, not 200, so search engines understand it.
  • Map technical failures to human messages. Catch errors at a sensible level and translate them, rather than showing raw API text.
  • Log details for your team, not for the user, and provide a reference ID that support can search.
  • Offer retry with backoff for temporary failures, and fail gracefully when a feature is unavailable.
  • Do not leak sensitive details, such as database errors, file paths or personal data, into messages.

When an API is involved, agree an error format between design and engineering so messages are consistent. Our piece on API integration best practices covers error handling and retries from the technical side.

Common mistakes

  • Showing a blank screen when there is no data.
  • Calling a failed request "empty".
  • Using the same generic message for every error.
  • Blaming the user.
  • Using humour at the wrong moment.
  • Clearing a form after a failed submission.
  • Leaving out the next step, so the person is stuck.
  • Forgetting to test these states, so they ship broken or unstyled.

What to do next

  1. List every screen and component that can be empty, and every action that can fail.
  2. Write a heading, a sentence and an action for each empty state.
  3. Rewrite your ten most common error messages using the three questions above.
  4. Add these states to your design files and to your acceptance criteria.
  5. Test them by deliberately breaking things, using a fresh account and a poor connection.

If you would like help with this, the CloudWiss team in Dublin can talk it through as part of our UI/UX and product design work.

Share this article

General educational information, not legal or professional advice for your specific situation.

Frequently asked questions

What is an empty state?

An empty state is what a screen shows when there is no content to display yet, such as a new account with no projects or a search with no results. It is a chance to explain what belongs there and how to add it. A blank white area gives people nothing to act on.

Should error messages include technical codes?

Show a code only if it helps support to diagnose the problem, and keep it secondary to a plain explanation. People need to know what happened and what to do, not the name of an exception. You can offer a reference number they can quote if they contact you.

Is it acceptable to use humour in error messages?

Sparingly, and never when the person has lost work or money. Humour can soften a harmless 404, but it can feel dismissive when someone is stuck. Clarity should always come first, with tone adjusted to the seriousness of the situation.

How do I test empty and error states?

Deliberately create them. Use a fresh account, disconnect the network, submit invalid data and filter to zero results, then walk through each screen. Add these cases to your acceptance criteria so they are built and reviewed, not left to chance.

Keep reading

Let’s build it

Ready to build with CloudWiss?

Tell us what you want to build, move to the cloud or keep running. We reply with a clear next step.