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.
| Component | Pattern | |
|---|---|---|
| Is | A reusable UI element | A reusable solution to a user task |
| Example | Text field | Address form |
| Lives in | Figma library + code package | Documentation 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
autocompleteattributes 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
- 1Explain requirements before input with help text ("At least 8 characters").
- 2Validate a field when the user leaves it (on blur), not on every keystroke of the first attempt.
- 3Once a field has an error, re-validate as they type so the error disappears as soon as it's fixed.
- 4On submit, show an error summary at the top listing all errors as links to each field, and move focus to it.
- 5Show each error next to its field with an icon, colour and a message that explains how to fix it.
- 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:
| Type | Example | What to show |
|---|---|---|
| First use | No projects yet | What this area is for + the action to get started |
| User cleared | Inbox zero, all tasks done | Positive confirmation, maybe a small celebration |
| No results | Search or filter found nothing | What was searched, suggestions, "Clear filters" |
| Error / unavailable | Couldn't load data | What happened + retry |
| No permission | You don't have access | Why + how to request access |
[ illustration ]
No invoices yet
Create your first invoice to get paid faster.
[ Create invoice ] Import from spreadsheetLoading pattern
| Wait time | Pattern |
|---|---|
| < 0.1s | No indicator needed |
| 0.1–1s | Subtle indicator or none; avoid flicker by delaying spinners briefly |
| 1–10s | Skeleton screens for content; spinner in buttons for actions |
| > 10s | Determinate 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
| Pattern | Use for | Behaviour |
|---|---|---|
| Inline message | Feedback tied to one element | Stays until resolved |
| Banner / alert | Page or system-level information | Stays; dismissible if not critical |
| Toast / snackbar | Brief confirmation of an action ("Message sent") | Disappears after a few seconds; may offer Undo |
| Modal dialog | Critical decision that must be answered now | Blocks the page; use sparingly |
| Badge | Counts 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
- 1Style the action as destructive (red) and keep it away from frequent actions.
- 2Prefer Undo over confirmation for reversible actions (archive, move to trash) — it's faster and safer.
- 3For irreversible actions, use a confirmation dialog that names the object and the consequence: "Delete project 'Website redesign'? This permanently deletes 34 files."
- 4Label the buttons with the action ("Delete project" / "Cancel") — never "Yes" / "No".
- 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
- Choose a pattern: empty states, search with filters or destructive actions.
- Find three examples in products you use and screenshot them.
- Write the problem the pattern solves and when to use it.
- List the components it uses and the rules for combining them.
- 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.
