Error State
UI DesignWhat is an Error State
An error state is the visual change that shows something went wrong, such as an invalid form field, a failed upload or a page that could not load. It marks the problem and explains how to fix it.
What an Error State includes
- Highlight: A red or high-contrast border on the affected element
- Icon: A warning or error symbol
- Message: Short text that says what is wrong and how to fix it
- Placement: Right next to the source of the error
When to show an Error State
Show errors after the user finishes, when they leave a field or submit the form, not while they are still typing. For system errors, such as a failed page load, show the error in place of the content with a way to retry.
Error States and accessibility
Never rely on color alone. WCAG requires that errors are identified and described in text. Combine color, an icon and a clear message.
Frequently asked questions
How should an error state look?
Use several cues together: a red or high-contrast border on the field, an error icon and a short text message right next to the problem. Amazon, for example, combines border highlighting, an icon and red text.
When should an error state appear?
After the user has had a chance to finish, usually when they leave a field or submit the form. Showing errors while someone is still typing feels hostile, NN/g notes, like grading a test before the student answers.
Is a red border enough to show an error?
No. WCAG 3.3.1 requires the error to be identified and described in text, and WCAG 1.4.1 says color must not be the only signal. Add a text message and an icon.
Related terms
View all UI Design terms →Input Field
An input field, or text field, is a box where users type information , such as a name, email address or password. It is the most common…
Empty State
An empty state is the screen or area users see when there is no content to show , such as a new dashboard, an empty inbox or a search with…
Error Prevention
Error prevention is the practice of designing an interface so users are less likely to make errors in the first place. It is the fifth of…
Interactive States
Interactive states are the visual changes that show how a component responds to the user. They tell users whether an element can be used…
Color Contrast
Color contrast is the difference in brightness between two colors, such as text and its background. It is measured as a contrast ratio…
