Chapter 61: Interaction patterns, forms and states
Interaction design at the scale of one control or one screen is a matter of states. A button can be resting, hovered, focused, pressed or disabled. A form can be empty, half-filled, wrong or sent. A list can be loading, full, empty or broken. Most of the problems found in usability tests live in the states nobody drew.
Direct manipulation
Direct manipulation is an interaction style in which people act on visible objects with physical actions and see the result at once. Dragging a file into a folder is the standard example, and pinching a photo to zoom is the touch version.1
Ben Shneiderman, a computer scientist at the University of Maryland, named the style in the early 1980s and set it out in a 1983 article in Computer.21 He described its properties:
- the objects of interest stay visible the whole time;
- physical actions, such as clicks, drags and taps, replace typed syntax;
- actions are rapid, incremental and reversible, and their effect shows immediately.
The result is that people learn by recognition, not recall. The history of how this became the graphical desktop is in → 45 Human-computer interaction: history and theory.
Direct manipulation is slow at scale. Moving 400 photos taken last March is tedious by dragging and quick with a filter or a command. It also asks a lot of hands: Sherugar and Budiu list accidental taps, strain from constant dragging, and problems for people with motor or visual impairments.1 WCAG 2.2 requires that anything done by dragging can also be done with a single pointer without dragging, unless the drag is essential: a sortable list, for example, also needs Move up and Move down.3 (→ 49 Accessibility and inclusive design)
Design patterns
A design pattern is a named, reusable solution to a problem that recurs in a known context. The idea comes from architecture. In A Pattern Language (1977), Christopher Alexander and his co-authors described 253 patterns for towns, buildings and construction, each giving a context, a problem and a solution, and each pointing to others it works with.45 A set of patterns linked to each other this way is a pattern language.
Programmers took the idea up first, and interface designers followed. Jenifer Tidwell’s Common Ground (1999) was written explicitly as an Alexandrian pattern language for interface design, and her book Designing Interfaces (O’Reilly, 2005) grew out of it.67 Familiar interface patterns include the wizard, infinite scroll, the undo toast and the inline edit. Each one carries its conditions with it: infinite scroll suits a feed and fails on a page with a footer people need to reach.
A pattern library is a team’s own documented set of patterns, now usually part of a design system (→ 65 Design systems). An anti-pattern is a common solution that causes more trouble than it solves. Patterns built to work against the user, such as a cancellation flow hidden behind five screens, are dark patterns (→ 44 Psychology and behavior).
Modes
A mode is a state in which the same input produces a different result. With Caps Lock on, the A key types “A”; in a drawing app, a click paints or selects depending on the tool.8 A mode error happens when people forget or don’t notice which mode they’re in. It is a kind of slip (→ 48 Usability and ergonomics).
Larry Tesler found in user tests at Xerox PARC that modes confused people who weren’t programmers, and he built Gypsy, a modeless text editor, in the 1970s.9 Modes can’t always be avoided, so make the active one obvious with more than one cue. A spring-loaded mode lasts only while a key is held, like Shift, so it can’t be forgotten.8 A modal dialog is also a mode: nothing else responds until it’s dismissed. Use one only when the user must answer before going on (→ 69 Mobile patterns and gestures).

Daniel Beardsmore, public domain, via Wikimedia Commons.
Component states
A component state is one of the defined appearances and behaviors of an interface component. A button typically needs at least these:
| State | When it applies | Usual treatment |
|---|---|---|
| Default | At rest | The base style |
| Hover | A pointer is over it | Slight color change; doesn’t exist on touch screens |
| Focus | It will receive keyboard input | A clear outline, the focus indicator |
| Active (pressed) | While being clicked or tapped | Darker or inset |
| Disabled | Visible but not operable | Reduced contrast |
| Loading | After activation, while waiting | Spinner in place of the label; no second press |
Selected, error and visited states apply to other components. Since hover is absent on touch, never put information only in a hover state.
WCAG 2.4.7 (level AA) requires a visible focus indicator for anything operable by keyboard.10 Browsers decide when to show it through the CSS :focus-visible rule: generally for keyboard users, and often not after a mouse click on a button.11 Removing the outline because it looks untidy is a common accessibility failure.
Disabled components are exempt from WCAG’s contrast minimum, which is why they’re often unreadable.12 A disabled Submit button also hides the reason it’s disabled. Where possible, leave the button active and explain what’s missing when it’s pressed.
Microinteractions
A microinteraction is a contained product moment that does one small task: liking a post, setting an alarm, muting a call. Dan Saffer set out the idea in his book Microinteractions (2013). Each has four parts.13 A trigger starts it, either a user action or a system condition. Rules decide what happens. Feedback shows the rules to the user, since rules themselves are invisible. Loops and modes govern what changes over time, such as what happens the tenth time someone uses it. A password field that shows a strength meter as the user types is one microinteraction; the strength rules decide the feedback.
Form design and validation
A form is where users do the most work for the product, so every field has a cost. Baymard Institute found the average e-commerce checkout had 11.3 fields in 2024, while most sites need only eight.14 Remove fields first, then design the rest.
Give every field a visible label outside it. A placeholder, the gray hint inside an empty field, disappears when typing starts, so people can’t check what a field wanted, often mistake it for a filled-in value, and may not hear it in a screen reader.15 Use the HTML input type or inputmode that matches the data, so a phone shows a number pad or an email keyboard.16
Fields must fit the people who fill them in. The W3C notes that many people write the family name first (Mao Ze Dong), and some people in Indonesia and Malaysia have only one name. A single “Full name” field avoids most problems; if names must be split, label the parts “Family name” and “Given names”, and don’t make either required.17
Inline validation is checking a field and showing the result beside it while the form is still being filled in. In 2009 Luke Wroblewski, with the London usability firm Etre, tested six versions of a registration form with 22 people. The best inline version, against validating only on submit, had a 22% higher success rate, 22% fewer errors, 31% higher satisfaction and 42% shorter completion time.18 It’s one small study. Validating after the person leaves a field worked better than validating on every keystroke, and errors shown before anyone had typed annoyed people.18
Client-side validation is a convenience. The server checks everything again and can still reject input with a 400 (→ 77 APIs), so the design needs a place to show server errors too.
Error messages
An error message is text that tells people what went wrong and how to fix it. Nielsen Norman Group’s guidelines (Neusesser and Sunwall, 2023) are the working standard:19
- Put it next to the problem, such as under the field at fault.
- Don’t signal an error by color alone; add an icon or text.
- Use plain language, not codes. “Expiry date is in the past” beats “Invalid input”.
- Be precise and give a remedy.
- Don’t blame the user.
- Keep what they typed, so they correct it instead of starting again.
WCAG 3.3.1 (level A) requires that an automatically detected error be identified and described in text, and 3.3.3 asks that a fix be suggested when one is known.20 These rules apply Nielsen’s ninth heuristic (→ 47 Laws and heuristics; for wording and tone, → 63 Content design and UX writing).
Empty and loading states
An empty state is what a screen or container shows when there’s nothing to display. Kaplan’s examples are first use (no projects yet) and a search that finds nothing.21 A good empty state says what’s happening, explains what the space is for, and offers the next step, such as a Create button. Never show “No records” while data is still loading: people believe it.21
A loading state is what the interface shows while it waits. Under about a second, show nothing.22 For whole-page loads of up to about 10 seconds, NN/g recommends a skeleton screen, a gray outline of the layout that the content fills in. Luke Wroblewski described replacing spinners with skeletons in the Polar app in 2013, because the spinners made people feel the app was slow.23 A spinner suits waits of about 2 to 10 seconds in one part of a page. Beyond 10 seconds, show a progress bar with percent done.2224 These thresholds are rules of thumb, based on the response-time limits in → 46 Affordances, signifiers, feedback and constraints.
Which state to show for each server response, from 200 with an empty list to 500, is mapped in → 77 APIs. How loading speed is measured is in → 75 JavaScript, browsers and performance.
See also
45 Human-computer interaction: history and theory · 46 Affordances, signifiers, feedback and constraints · 48 Usability and ergonomics · 63 Content design and UX writing · 65 Design systems · 77 APIs
Sources
- Alexander, C., Ishikawa, S. and Silverstein, M., with Jacobson, M., Fiksdahl-King, I. and Angel, S. (1977). A Pattern Language: Towns, Buildings, Construction. Oxford University Press.
- Baymard Institute (2024). “Checkout Optimization: Reduce Form Fields.”
- Kaplan, K. (2021). “Designing Empty States in Complex Applications: 3 Guidelines.” Nielsen Norman Group.
- Laubheimer, P. (2019). “Modes in User Interfaces: When They Help and When They Hurt Users.” Nielsen Norman Group.
- MDN Web Docs (n.d.). “:focus-visible”; “inputmode”; “HTML attribute: readonly”; “HTML attribute: disabled.” Mozilla.
- Muldoon, K. (2024). “A Pattern Language.” UX Magazine.
- Neusesser, T. and Sunwall, E. (2023). “Error-Message Guidelines.” Nielsen Norman Group.
- Perry, T. S. (2005). “Of Modes and Men.” IEEE Spectrum.
- Saffer, D. (2013). Microinteractions: Designing with Details. O’Reilly Media.
- Sherugar, S. and Budiu, R. (2016). “Direct Manipulation: Definition.” Nielsen Norman Group.
- Sherwin, K. (2014). “Placeholders in Form Fields Are Harmful.” Nielsen Norman Group.
- Sherwin, K. (2014). “Progress Indicators Make a Slow System Less Insufferable.” Nielsen Norman Group.
- Shneiderman, B. (1983). “Direct Manipulation: A Step Beyond Programming Languages.” Computer 16(8), 57–69.
- Tankala, S. (2023). “Skeleton Screens 101.” Nielsen Norman Group.
- Tidwell, J. (1999). Common Ground: A Pattern Language for Human-Computer Interface Design.
- Tidwell, J. (2005). Designing Interfaces. O’Reilly Media.
- W3C (2023). Understanding WCAG 2.2: 1.4.3, 2.4.7, 2.5.7, 3.3.1.
- W3C Internationalization (n.d.). “Personal names around the world.”
- Wroblewski, L. (2009). “Inline Validation in Web Forms.” A List Apart.
- Wroblewski, L. (2013). “Mobile Design Details: Avoid The Spinner.” LukeW.
Notes
- Sherugar, S. and Budiu, R. (2016, August 21). “Direct Manipulation: Definition.” Nielsen Norman Group. https://www.nngroup.com/articles/direct-manipulation/ ↩ ↩ ↩
- Shneiderman, B. (1983). “Direct Manipulation: A Step Beyond Programming Languages.” Computer 16(8), 57–69. IEEE. https://doi.org/10.1109/MC.1983.1654471 ↩
- W3C (2023). “Understanding Success Criterion 2.5.7: Dragging Movements.” WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements.html ↩
- PatternLanguage.com (n.d.). A Pattern Language, by Christopher Alexander, Sara Ishikawa and Murray Silverstein, with Max Jacobson, Ingrid Fiksdahl-King and Shlomo Angel. Oxford University Press, 1977. https://www.patternlanguage.com/ ↩
- Muldoon, K. (2024, January 18). “A Pattern Language.” UX Magazine. https://uxmag.com/articles/a-pattern-language ↩
- Tidwell, J. (1999). Common Ground: A Pattern Language for Human-Computer Interface Design. https://www.mit.edu/~jtidwell/common_ground_onefile.html ↩
- Tidwell, J. (2005). Designing Interfaces, preface. O’Reilly Media. https://www.oreilly.com/library/view/designing-interfaces/0596008031/pr02s03.html ↩
- Laubheimer, P. (2019, April 14). “Modes in User Interfaces: When They Help and When They Hurt Users.” Nielsen Norman Group. https://www.nngroup.com/articles/modes/ ↩ ↩
- Perry, T. S. (2005, August 1). “Of Modes and Men.” IEEE Spectrum. https://spectrum.ieee.org/of-modes-and-men ↩
- W3C (2023). “Understanding Success Criterion 2.4.7: Focus Visible.” WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html ↩
- MDN Web Docs (n.d.). “:focus-visible.” https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:focus-visible ↩
- W3C (2023). “Understanding Success Criterion 1.4.3: Contrast (Minimum),” Incidental exception. WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html ↩
- Saffer, D. (2013). Microinteractions: Designing with Details. O’Reilly Media. Book description at https://oreilly.com/library/view/microinteractions/9781449342760 ↩
- Baymard Institute (2024, June 26). “Checkout Optimization: Reduce Form Fields.” https://baymard.com/blog/checkout-flow-average-form-fields ↩
- Sherwin, K. (2014, May 11). “Placeholders in Form Fields Are Harmful.” Nielsen Norman Group. https://www.nngroup.com/articles/form-design-placeholders/ ↩
- MDN Web Docs (n.d.). “inputmode.” https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode ↩
- W3C Internationalization (n.d.). “Personal names around the world.” https://www.w3.org/International/questions/qa-personal-names ↩
- Wroblewski, L. (2009, September 1). “Inline Validation in Web Forms.” A List Apart 291. https://alistapart.com/article/inline-validation-in-web-forms/ ↩ ↩
- Neusesser, T. and Sunwall, E. (2023, May 14). “Error-Message Guidelines.” Nielsen Norman Group. https://www.nngroup.com/articles/error-message-guidelines/ ↩
- W3C (2023). “Understanding Success Criterion 3.3.1: Error Identification.” WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html ↩
- Kaplan, K. (2021, September 19). “Designing Empty States in Complex Applications: 3 Guidelines.” Nielsen Norman Group. https://www.nngroup.com/articles/empty-state-interface-design/ ↩ ↩
- Tankala, S. (2023, June 4). “Skeleton Screens 101.” Nielsen Norman Group. https://www.nngroup.com/articles/skeleton-screens/ ↩ ↩
- Wroblewski, L. (2013, September 17). “Mobile Design Details: Avoid The Spinner.” LukeW. https://www.lukew.com/ff/entry.asp?1797 ↩
- Sherwin, K. (2014, October 26). “Progress Indicators Make a Slow System Less Insufferable.” Nielsen Norman Group. https://www.nngroup.com/articles/progress-indicators/ ↩
- MDN Web Docs (n.d.). “HTML attribute: readonly.” https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/readonly ↩
- MDN Web Docs (n.d.). “HTML attribute: disabled.” https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/disabled ↩