UI Foundations · Component design
Design every state of a component
A button or field is not one picture but a set of states. Listing them before you draw prevents most of the gaps that developers otherwise have to guess.
Written by Inspireca Design (drafted with AI assistance)Updated Not yet reviewed by an editor
In short
- List the states before designing: default, focused, filled, disabled, loading, error, success.
- Disabled must look unavailable but stay readable.
- An error state needs a message, not only a colour.
- Decide what happens with very long text and with no content.
The picture of a component in a design file is usually its best moment: default state, tidy label, ideal content. Real use is everything else. Designing the other states up front is the most useful habit in component work.
The checklist
For anything a person can interact with, decide how it looks in each state that applies:
- Default: at rest.
- Hover and pressed: feedback that a pointer or finger is on it.
- Focused: a visible outline for keyboard and switch users.
- Filled: for inputs, with real content in them.
- Disabled: not available right now.
- Loading: something is in progress.
- Error and success: the result of checking.
See it in a real form
The sign-up form of Headspace in the library shows several of these on two screens. With nothing typed, the "Create an account" button is grey: disabled. Once a first name is entered, the field's label moves to the top of the field in small type and a green tick appears at the end: filled and valid. The password field states its rule, eight or more characters, inside the field before anything is typed. The breakdown walks through them.
Disabled, carefully
A disabled control should look unavailable, but people still need to read it to understand what will become possible. If you can, say what is missing near the button, because a grey button on its own does not explain why.
Errors in words
An error state has three parts: a visual change, a message that says what is wrong, and a hint at how to fix it. Place the message next to the thing it is about.
Awkward content
Finally, try the content you did not plan for: a name with forty characters, a translated label twice as long, an empty list. Decide whether text wraps, truncates or shrinks, and write it down. These decisions belong in the component spec.