Skip to content
NewTemplates & toolkits are on the way — join the waitlist
Hecham Gazhi

Design Systems · Lesson 08 / 13

Patterns

Reusable solutions to recurring user problems: how patterns differ from components, and detailed guidance for forms, validation, empty states, loading, errors, search and filtering, navigation, notifications and confirmation.

5 min read · 5 quiz questions

Components vs patterns

Components are building blocks: a text field, a button, a checkbox. Patterns are proven ways of combining components to solve a recurring user problem: collecting an address, recovering from an error, filtering a long list, confirming a dangerous action.

Patterns capture knowledge that individual components can't. A perfect text field doesn't tell you when to validate, how to order fields, or where to put the error summary. Patterns do.

ComponentPattern
IsA reusable UI elementA reusable solution to a user task
ExampleText fieldAddress form
Lives inFigma library + code packageDocumentation with examples (sometimes templates)
Answers"What does it look like and how does it behave?""How do we solve this problem well, every time?"

Form pattern

  • Single column, with fields grouped under clear headings.
  • Labels above fields, always visible; placeholders only for format examples.
  • Ask only what's needed; mark optional fields as "(optional)".
  • Use the right input type and autocomplete attributes so browsers can fill data.
  • Break long forms into steps with a progress indicator, and allow going back without losing data.
  • One primary submit button, labelled with what it does ("Create account").

Validation pattern

  1. 1Explain requirements before input with help text ("At least 8 characters").
  2. 2Validate a field when the user leaves it (on blur), not on every keystroke of the first attempt.
  3. 3Once a field has an error, re-validate as they type so the error disappears as soon as it's fixed.
  4. 4On submit, show an error summary at the top listing all errors as links to each field, and move focus to it.
  5. 5Show each error next to its field with an icon, colour and a message that explains how to fix it.
  6. 6Keep everything the user typed.

Empty states

An empty state appears when there's no content to show. It's a chance to help, not a dead end. There are several kinds:

TypeExampleWhat to show
First useNo projects yetWhat this area is for + the action to get started
User clearedInbox zero, all tasks donePositive confirmation, maybe a small celebration
No resultsSearch or filter found nothingWhat was searched, suggestions, "Clear filters"
Error / unavailableCouldn't load dataWhat happened + retry
No permissionYou don't have accessWhy + how to request access
Exampletext
[ illustration ]
No invoices yet
Create your first invoice to get paid faster.
[ Create invoice ]   Import from spreadsheet

Loading pattern

Wait timePattern
< 0.1sNo indicator needed
0.1–1sSubtle indicator or none; avoid flicker by delaying spinners briefly
1–10sSkeleton screens for content; spinner in buttons for actions
> 10sDeterminate progress with an estimate; let users do something else

These thresholds come from long-standing research on response times (popularised by Jakob Nielsen): about 0.1s feels instant, about 1s keeps the flow of thought, about 10s is the limit of attention.

Error handling pattern

  • Prevent first: constraints, good defaults, confirmations for destructive actions.
  • Explain in plain language: what happened, why, and how to fix it.
  • Place the message where the problem is: inline for fields, banners for page-level issues, toasts only for minor, temporary messages.
  • Preserve work: never lose input because of an error; autosave drafts.
  • Offer a way out: retry, contact support, go back.
  • Don't blame the user: "We couldn't find that page" rather than "You entered an invalid URL".

Search and filtering pattern

  • Make search visible where people expect it (top of the page or list).
  • Show suggestions and recent searches as people type.
  • Tolerate typos and synonyms where possible.
  • Show the number of results and what's being searched.
  • Show active filters as removable chips with a "Clear all" option.
  • On mobile, put filters in a full-screen sheet with an "Show 24 results" button.
  • Keep filter and search state in the URL so it can be shared and survives refresh.

Notifications and feedback

PatternUse forBehaviour
Inline messageFeedback tied to one elementStays until resolved
Banner / alertPage or system-level informationStays; dismissible if not critical
Toast / snackbarBrief confirmation of an action ("Message sent")Disappears after a few seconds; may offer Undo
Modal dialogCritical decision that must be answered nowBlocks the page; use sparingly
BadgeCounts or status (3 unread)Updates in place

Common mistake: Putting important errors or information in toasts that disappear before people can read them — especially users of screen readers or magnification. Toasts are for non-critical confirmations.

Destructive action pattern

  1. 1Style the action as destructive (red) and keep it away from frequent actions.
  2. 2Prefer Undo over confirmation for reversible actions (archive, move to trash) — it's faster and safer.
  3. 3For irreversible actions, use a confirmation dialog that names the object and the consequence: "Delete project 'Website redesign'? This permanently deletes 34 files."
  4. 4Label the buttons with the action ("Delete project" / "Cancel") — never "Yes" / "No".
  5. 5For very high-risk actions, require typing the name of the object.

Key takeaways

  • Patterns combine components to solve recurring user problems and capture knowledge components can't.
  • Forms: one column, visible labels, minimal fields, clear progress; validate on blur and summarise on submit.
  • Design every empty state: first use, cleared, no results, error and no permission.
  • Choose loading indicators by wait time, and handle errors by preventing, explaining, preserving and offering a way out.
  • Use the right feedback pattern; prefer Undo for reversible actions and specific confirmations for irreversible ones.

Exercise

Document a pattern

  1. Choose a pattern: empty states, search with filters or destructive actions.
  2. Find three examples in products you use and screenshot them.
  3. Write the problem the pattern solves and when to use it.
  4. List the components it uses and the rules for combining them.
  5. Add do's and don'ts with your screenshots as examples.

Test yourself

Patterns quiz

5 questions. Score 70% or more to complete the lesson.

  1. 1.What's the difference between a component and a pattern?
  2. 2.When should a field first be validated?
  3. 3.What should a 'no results' empty state include?
  4. 4.Which is the best confirmation dialog button label?
  5. 5.Why avoid putting critical errors in toasts?