Skip to content
Lesson 7 of 8intermediate8 min read

Component States

A component is never one picture but a family of conditions — default, hover, focus, pressed, disabled, loading, error, empty — each of which has to be designed deliberately.

01

Definition

A component state is the condition an interface element is in at a given moment, together with the visual form that condition takes. A button is not one picture; it is a family. There is the resting default, the hover that acknowledges a pointer, the focus indicator that marks the element as the keyboard's current target, the pressed appearance during activation, the disabled treatment that says not now, the loading state after submission, and the success or error result that follows. Alongside these interaction states sit content states: a list holding nothing, holding one item, holding two hundred, holding a name long enough to wrap onto three lines. To design a component is to design the whole set, not only its most flattering member.

02

Why It Exists

States exist because an interface is a conversation, and a conversation in which one party never reacts is unnerving. A physical switch offers resistance under the finger and a click at the end of its travel; a rectangle of pixels offers nothing unless a designer supplies it. Graphical interfaces borrowed the vocabulary of physical controls precisely to restore that feedback loop: a control that visually depresses tells you the machine received your intent. States also carry information the interface would otherwise have to spell out in words. A dimmed control communicates unavailability without a sentence. A progress indicator converts silence into a promise. Without states, people cannot tell whether a system is working, waiting, broken, or ignoring them, so they fill the uncertainty with repeated clicks.

03

Examples

  • A submit button in a checkout flow passes through at least five appearances in a few seconds: resting, hovered, focused by keyboard, pressed, then disabled with a spinner while the payment is authorized, and finally either a success confirmation or an inline error explaining what to fix.
  • A search results list has a state for no query yet entered, a state for results found, a state for a query that matched nothing, and a state for a request that failed. Each needs different words and different next actions, and only one of them is the ideal case.
  • A text input carries a default, a focused state with a visible ring, a filled state, an invalid state with a message attached to the field rather than floating at the top of the form, and a read-only state that looks clearly different from an editable one.
  • A user avatar component must handle a loaded photograph, an image still downloading, an image that failed, and a person with no photograph at all, which usually falls back to initials — and then to a single letter when the name is a single word.
04

History

The vocabulary of interaction states was assembled at Xerox PARC during the 1970s, where research on graphical systems established that on-screen objects should visibly respond to the pointer. Those conventions reached a mass audience with the Apple Macintosh in 1984, whose widget toolkit shipped standard appearances for pressed and disabled controls so that every application behaved alike. Apple's Human Interface Guidelines, published from 1987 onward, wrote the conventions down for independent developers. The web later rebuilt the same ideas declaratively: the CSS pseudo-classes :hover, :focus, :active and :disabled let a state be described as a rule rather than drawn as a separate image. Google's Material Design, introduced in 2014, pushed further by documenting interaction states systematically so components across a product reacted with matching intensity.

05

In Modern Design

Modern practice treats states as part of a component's definition rather than as polish added at the end. Design tools express them as variants, and design systems encode them as tokens, so the color of a hovered surface or the thickness of a focus ring is defined once and inherited everywhere. That centralization is what keeps a product coherent: when states live in each screen file, a hundred designers produce a hundred hovers. Accessibility has also moved focus from decoration to requirement. The Web Content Accessibility Guidelines expect a visible focus indicator, because keyboard and switch users navigate by seeing where they are; removing the default outline without replacing it makes a product unusable for them. Motion, meanwhile, is kept short and consistent so state changes read as feedback, not spectacle.

06

Real-World Example

Consider a message composed in an email client and sent with a weak connection. The send control moves from default to pressed, then becomes disabled so the message cannot be submitted twice. The interface does not wait for the server before responding: it shows the message as sent and returns you to the inbox, an approach known as optimistic UI, where the likely outcome is displayed immediately and reconciled later. If the request eventually fails, the message reappears with an error state and a retry action rather than vanishing. Meanwhile the inbox itself has states of its own — a first-run empty state that explains what will appear here, a loading state, a state with thousands of threads, and an offline state that says which actions will sync later.

07

Key Principles

  • Design the full set before refining any single state, because a component that only exists in its ideal condition will be finished by an engineer under deadline pressure.
  • Treat the focus indicator as a functional requirement rather than an aesthetic choice; it is how keyboard and assistive-technology users know where they are.
  • Give empty states and error states the same care as the populated ones, since they appear at the moments when a person is most likely to abandon the product.
  • Distinguish states by more than color alone, so the difference between valid and invalid survives color blindness, glare, and a grayscale print.
  • Stress-test content states with no items, one item, many items, and text far longer than the example copy, because real data is never as tidy as a mockup.
  • Encode states as tokens and variants in a design system so behavior stays consistent across screens, teams, and future features.

Why it matters

Most of the time a person spends inside an interface is not spent in the ideal state pictured in a portfolio. They arrive with an empty account, mistype a password, lose a connection, or wait for something slow. The quality of those moments determines whether the product feels reliable. States are also where accessibility is won or lost: a missing focus ring quietly excludes everyone who does not use a mouse, and an error announced only by turning a border red excludes anyone who cannot distinguish that red. Because states are small and repetitive, they are easy to skip and expensive to retrofit — inconsistent hovers and improvised error messages accumulate into an interface that feels assembled by strangers, which is usually the honest description of what happened.

Then vs Now

Then

Desktop toolkits of the 1980s shipped a small fixed set of states — normal, pressed, disabled — drawn by the operating system and inherited by every application. Designers rarely specified them, and rarely could: the states came with the platform, which is precisely why software from different vendors behaved so consistently.

Now

Products define their own components, so every state is a decision someone has to make. The set has grown to include loading, empty, offline, selected and optimistic states, and the burden of consistency has shifted from the operating system to the product's own design system and its tokens.

Try it yourself

Pick one component from a product you use daily — a button, an input, a card, or a list row. Draw its default appearance, then enumerate every other condition it can enter: hover, focus, pressed, disabled, loading, error, success, selected. Add the content states next: empty, one item, many items, and a version with text three times longer than the sample. Draw each one at real size. Count how many you had never consciously noticed. Then open the product and try to reach each state, using only the keyboard for one pass. Note which states are missing, which are indistinguishable from one another, and which appear only after a failure. Finally, write down the shared rule that ought to govern each state across the product.

Test yourself

5 questions, one at a time

Answers are revealed at the end, so you can think without being nudged.

Sources

  • Designing Interfaces — Jenifer Tidwell (2005) · Book
  • Design Systems — Alla Kholmatova (2017) · Book
  • Human Interface Guidelines — Apple (1987 onward) · Primary source
  • Web Content Accessibility Guidelines (WCAG) — W3C (2008 onward) · Institution
  • Material Design documentation — Google (2014 onward) · Primary source