UX Feedback Patterns
Purpose
Ensure users never wonder "What's happening?" or "Did that work?" through clear, consistent feedback patterns.
Core Principle
Users must receive feedback for EVERY interaction.
Every user action needs feedback in one or more states:
- Loading/Processing
- Success
- Error
- Empty
Loading States
When to Show Loading
Timing thresholds (adjust to your context):
- < 100ms: Perceived as instant, no feedback needed
- 100-300ms: Optional subtle indicator
- 300ms-1s: Show spinner or skeleton
- 1-5s: Spinner + explanatory text
- 5-10s: Progress bar with percentage
- 10s+: Progress bar + explanation + cancel option
Loading Patterns
Button Loading:
- Disable button to prevent double-submission
- Show spinner inside button or change text
- Keep button in place (don't shift layout)
Content Loading:
- Prefer skeleton screens over spinners
- Match skeleton structure to actual content
- Maintain layout space (prevent content jump)
Progress Indicators:
- Use for file uploads, large operations
- Show percentage when determinable
- Provide cancel option for long operations
Success States
When to Show Success
Always show for:
- Form submissions
- Data mutations (create, update, delete)
- File uploads
- Account changes
Skip for:
- Very quick actions (near-instant completion)
- Continuous interactions (likes, toggles) - use optimistic updates
- Actions where feedback is inherent in result
Success Patterns
Toast Notifications:
- Auto-dismiss after 3-5 seconds
- Position: top-right or top-center (consistent)
- Specific message, not generic "Success"
Inline Messages:
- For form submissions: show below form
- Less intrusive than toasts
- Can stay visible longer
Visual Confirmation:
- Button state change (e.g., "Save" → "Saved ✓")
- Brief color change (green tint)
- Return to normal after 2-3 seconds
Error States
Error Message Principles
Be Specific:
- ❌ "Error occurred"
- ✅ "Email already exists. Try logging in instead."
Be Helpful:
- Explain what happened
- Suggest what to do next
- Provide recovery action when possible
Be Human:
- Natural language, avoid technical jargon
- Don't blame user
- Empathetic tone for serious errors
Severity Levels:
- Critical: System failure, data loss - modal, manual dismiss
- High: Form validation, API errors - prominent, actionable
- Medium: Warnings, non-blocking - dismissible notices
- Low: Helper text, suggestions - subtle, informative
Error Patterns
Form Field Errors:
- Show inline, next to/below field
- Trigger on blur (not every keystroke)
- Include error icon for visibility
- Keep visible until corrected
Global Errors:
- Prominent alert at top or modal
- Include error icon and title
- Explain what failed and why
- Provide action: Retry, Contact support, Learn more
- Manual dismiss (don't auto-hide critical errors)
Error Recovery:
- Always provide a path forward
- "Try Again" button for transient errors
- Link to help/support for persistent issues
- Save user's work when possible
Empty States
Never Show Blank Screens
Empty state must include:
- Icon/Illustration: Visual context
- Title: "No [items] yet"
- Description: Brief explanation
- Action (when possible): CTA to create first item
Empty State Types
First-Time Empty:
- Welcoming, encouraging tone
- Clear next step to get started
Search No Results:
- Acknowledge the query
- Suggest alternatives (check spelling, try different terms)
- Provide way to clear/modify search
Filtered Empty:
- Explain filters are active
- Show way to clear filters
Interaction Patterns
Form Validation
Validation Timing:
- On blur: Validate individual field
- On submit: Validate entire form
- On change: Only for real-time feedback (password strength, username availability)
Success Indicators:
- Optional: show checkmark for valid fields
- Only after field touched
- Subtle, not distracting
Button States
Required states:
- Default: Normal appearance
- Hover: Visual feedback
- Active/Pressed: Depressed appearance
- Loading: Spinner + disabled
- Disabled: Grayed out + tooltip/explanation
- Success: Brief confirmation (2-3s)
Optimistic Updates
Pattern: Update UI immediately, rollback on error
Best for:
- Fast, reliable operations (likes, favorites)
- Low-stakes actions
- When instant feedback improves perceived performance
How it works:
- Update UI immediately (assume success)
- Send API request
- If success: nothing (already updated)
- If error: rollback + show error
When NOT to use:
- Destructive actions (delete)
- Complex validations
- Critical operations (payments)
Destructive Actions
Always confirm before:
- Deleting items
- Permanent changes
- Bulk actions
Confirmation pattern:
- Modal dialog with clear title
- Explain consequences: "This cannot be undone"
- Primary action labeled clearly ("Delete", not "Yes")
- Use danger color (red) for destructive button
- Provide "Cancel" as escape hatch
Best Practices
Timing
- Feedback should feel immediate (instant perceived response)
- Success messages: auto-dismiss after 3-5 seconds
- Error messages: manual dismiss or longer timeout
- Loading threshold: Show indicators after ~300ms
Tone
- Be specific, not vague
- Be helpful, suggest next steps
- Be human, avoid technical jargon
- Don't blame user
Accessibility
- Use ARIA live regions for dynamic messages
- Associate errors with form fields
- Provide text alternatives for visual indicators
- Don't rely on color alone
Consistency
- Same pattern for same action across app
- Predictable feedback locations
- Consistent timing and animations
- Unified messaging tone
Common Mistakes
- Silent failures - Action fails with no feedback
- Vague errors - "Error" tells nothing useful
- No loading state - User clicks repeatedly
- Blank screens - Empty state without explanation
- Disabled without reason - No tooltip explaining why
- Flickering loaders - Show only for operations with noticeable delay
- Success overload - Toast for every tiny action
- Technical error codes - Show user-friendly messages
- No recovery path - Error with no next step
- Blocking entire UI - Use local loading when possible
Validation Checklist
For every interactive feature:
Key Takeaway
Never leave users guessing. Clear, timely feedback is the difference between a frustrating experience and a delightful one.
Timing guidelines are based on UX research but should be adjusted to your context. When in doubt, over-communicate rather than under-communicate.
1---2name: ux-feedback-patterns3description: User feedback patterns for interactions - loading states, success/error messages, form validation, empty states. Ensures users understand system state and next steps. Use when implementing user-facing state changes and interactions: - Form submissions with validation feedback, success/error messages - Async operations needing loading indicators (API calls, data fetching) - Error handling flows with clear recovery paths and retry options - Empty state designs with helpful messaging (no data, no results) - User mentions "form", "loading", "error", "validation", "async", "API call" Keywords: loading, success, error, form, validation, async, feedback, toast, empty state Focus on WHEN to show feedback, WHAT type (toast/inline/modal), HOW LONG (timing).4---5
6# UX Feedback Patterns
7
8## Purpose
9Ensure users never wonder "What's happening?" or "Did that work?" through clear, consistent feedback patterns.
10
11---
12
13## Core Principle
14
15**Users must receive feedback for EVERY interaction.**
16
17Every user action needs feedback in one or more states:
181. Loading/Processing
192. Success
203. Error
214. Empty
22
23---
24
25## Loading States
26
27### When to Show Loading
28
29**Timing thresholds (adjust to your context):**
30- **< 100ms**: Perceived as instant, no feedback needed
31- **100-300ms**: Optional subtle indicator
32- **300ms-1s**: Show spinner or skeleton
33- **1-5s**: Spinner + explanatory text
34- **5-10s**: Progress bar with percentage
35- **10s+**: Progress bar + explanation + cancel option
36
37### Loading Patterns
38
39**Button Loading:**
40- Disable button to prevent double-submission
41- Show spinner inside button or change text
42- Keep button in place (don't shift layout)
43
44**Content Loading:**
45- Prefer skeleton screens over spinners
46- Match skeleton structure to actual content
47- Maintain layout space (prevent content jump)
48
49**Progress Indicators:**
50- Use for file uploads, large operations
51- Show percentage when determinable
52- Provide cancel option for long operations
53
54---
55
56## Success States
57
58### When to Show Success
59
60**Always show for:**
61- Form submissions
62- Data mutations (create, update, delete)
63- File uploads
64- Account changes
65
66**Skip for:**
67- Very quick actions (near-instant completion)
68- Continuous interactions (likes, toggles) - use optimistic updates
69- Actions where feedback is inherent in result
70
71### Success Patterns
72
73**Toast Notifications:**
74- Auto-dismiss after 3-5 seconds
75- Position: top-right or top-center (consistent)
76- Specific message, not generic "Success"
77
78**Inline Messages:**
79- For form submissions: show below form
80- Less intrusive than toasts
81- Can stay visible longer
82
83**Visual Confirmation:**
84- Button state change (e.g., "Save" → "Saved ✓")
85- Brief color change (green tint)
86- Return to normal after 2-3 seconds
87
88---
89
90## Error States
91
92### Error Message Principles
93
94**Be Specific:**
95- ❌ "Error occurred"
96- ✅ "Email already exists. Try logging in instead."
97
98**Be Helpful:**
99- Explain what happened
100- Suggest what to do next
101- Provide recovery action when possible
102
103**Be Human:**
104- Natural language, avoid technical jargon
105- Don't blame user
106- Empathetic tone for serious errors
107
108**Severity Levels:**
109- **Critical**: System failure, data loss - modal, manual dismiss
110- **High**: Form validation, API errors - prominent, actionable
111- **Medium**: Warnings, non-blocking - dismissible notices
112- **Low**: Helper text, suggestions - subtle, informative
113
114### Error Patterns
115
116**Form Field Errors:**
117- Show inline, next to/below field
118- Trigger on blur (not every keystroke)
119- Include error icon for visibility
120- Keep visible until corrected
121
122**Global Errors:**
123- Prominent alert at top or modal
124- Include error icon and title
125- Explain what failed and why
126- Provide action: Retry, Contact support, Learn more
127- Manual dismiss (don't auto-hide critical errors)
128
129**Error Recovery:**
130- Always provide a path forward
131- "Try Again" button for transient errors
132- Link to help/support for persistent issues
133- Save user's work when possible
134
135---
136
137## Empty States
138
139### Never Show Blank Screens
140
141**Empty state must include:**
1421. **Icon/Illustration**: Visual context
1432. **Title**: "No [items] yet"
1443. **Description**: Brief explanation
1454. **Action** (when possible): CTA to create first item
146
147### Empty State Types
148
149**First-Time Empty:**
150- Welcoming, encouraging tone
151- Clear next step to get started
152
153**Search No Results:**
154- Acknowledge the query
155- Suggest alternatives (check spelling, try different terms)
156- Provide way to clear/modify search
157
158**Filtered Empty:**
159- Explain filters are active
160- Show way to clear filters
161
162---
163
164## Interaction Patterns
165
166### Form Validation
167
168**Validation Timing:**
169- On blur: Validate individual field
170- On submit: Validate entire form
171- On change: Only for real-time feedback (password strength, username availability)
172
173**Success Indicators:**
174- Optional: show checkmark for valid fields
175- Only after field touched
176- Subtle, not distracting
177
178### Button States
179
180**Required states:**
181- Default: Normal appearance
182- Hover: Visual feedback
183- Active/Pressed: Depressed appearance
184- Loading: Spinner + disabled
185- Disabled: Grayed out + tooltip/explanation
186- Success: Brief confirmation (2-3s)
187
188### Optimistic Updates
189
190**Pattern:** Update UI immediately, rollback on error
191
192**Best for:**
193- Fast, reliable operations (likes, favorites)
194- Low-stakes actions
195- When instant feedback improves perceived performance
196
197**How it works:**
1981. Update UI immediately (assume success)
1992. Send API request
2003. If success: nothing (already updated)
2014. If error: rollback + show error
202
203**When NOT to use:**
204- Destructive actions (delete)
205- Complex validations
206- Critical operations (payments)
207
208### Destructive Actions
209
210**Always confirm before:**
211- Deleting items
212- Permanent changes
213- Bulk actions
214
215**Confirmation pattern:**
216- Modal dialog with clear title
217- Explain consequences: "This cannot be undone"
218- Primary action labeled clearly ("Delete", not "Yes")
219- Use danger color (red) for destructive button
220- Provide "Cancel" as escape hatch
221
222---
223
224## Best Practices
225
226### Timing
227- Feedback should feel immediate (instant perceived response)
228- Success messages: auto-dismiss after 3-5 seconds
229- Error messages: manual dismiss or longer timeout
230- Loading threshold: Show indicators after ~300ms
231
232### Tone
233- Be specific, not vague
234- Be helpful, suggest next steps
235- Be human, avoid technical jargon
236- Don't blame user
237
238### Accessibility
239- Use ARIA live regions for dynamic messages
240- Associate errors with form fields
241- Provide text alternatives for visual indicators
242- Don't rely on color alone
243
244### Consistency
245- Same pattern for same action across app
246- Predictable feedback locations
247- Consistent timing and animations
248- Unified messaging tone
249
250---
251
252## Common Mistakes
253
2541. **Silent failures** - Action fails with no feedback
2552. **Vague errors** - "Error" tells nothing useful
2563. **No loading state** - User clicks repeatedly
2574. **Blank screens** - Empty state without explanation
2585. **Disabled without reason** - No tooltip explaining why
2596. **Flickering loaders** - Show only for operations with noticeable delay
2607. **Success overload** - Toast for every tiny action
2618. **Technical error codes** - Show user-friendly messages
2629. **No recovery path** - Error with no next step
26310. **Blocking entire UI** - Use local loading when possible
264
265---
266
267## Validation Checklist
268
269For every interactive feature:
270- [ ] Loading state for async operations with noticeable delay
271- [ ] Success feedback (toast, inline, or visual confirmation)
272- [ ] Error messages specific and actionable
273- [ ] Empty states have helpful messaging + action
274- [ ] Optimistic updates rollback on failure
275- [ ] Destructive actions require confirmation
276- [ ] All feedback is accessible (ARIA, alt text)
277- [ ] States are visually distinct and clear
278- [ ] No silent failures
279- [ ] Consistent patterns across application
280
281---
282
283## Key Takeaway
284
285**Never leave users guessing.** Clear, timely feedback is the difference between a frustrating experience and a delightful one.
286
287Timing guidelines are based on UX research but should be adjusted to your context. When in doubt, over-communicate rather than under-communicate.