Sub topic 2
Loading States and How Waiting Feels
What to assume
This chapter assumes you know basic UI terms such as layout, component, and copy. You also understand that a web or mobile app may fetch data asynchronously, meaning the app starts a request and receives the result later. You can read basic HTML and TypeScript.
A loading state is the condition a screen enters while it waits for data or an action to finish. The screen might be waiting for a project list, a search result, a saved form, or the next page of results.
Loading is not one moment with one solution. The right design depends on what the user is waiting for, how long the wait may take, and what remains useful on screen.
Waiting has two parts
A user experiences both actual time and perceived time.
- Actual time is how long the system takes to respond.
- Perceived time is how long the wait feels to the user.
You cannot always reduce actual time. You can reduce uncertainty and make the wait feel purposeful. A blank screen creates uncertainty because the user cannot tell whether the app is working. Immediate feedback confirms that the app received the action.
A useful loading experience answers three questions:
- Did the app receive my action?
- Is the app still working?
- What can I do while I wait?
The answer may be a small status message, a progress indicator, or the previous content with a subtle update marker.
Identify the loading situation
Different requests need different feedback.
| Situation | What the user needs | Suitable first feedback |
|---|---|---|
| First screen load | Confirmation that content is coming | Page-level placeholder or status |
| Refresh of existing content | Continued access to current content | Keep content visible and show updating feedback |
| Form submission | Confirmation that the action started | Disable or label the submit control |
| Loading another page | Context while more items arrive | Inline indicator near the list boundary |
| Long task with known progress | A sense of completion | Determinate progress indicator |
The first load often has no content to preserve. A refresh does. Replacing a useful screen with a full-page spinner during every refresh makes the interface feel less stable and may hide information the user still needs.
Make the wait visible without making it noisy
Show feedback immediately when the user performs an action. For example, change “Save” to “Saving…” or mark a list as updating. This small response prevents repeated clicks and reassures the user that the action was accepted.
For very fast requests, a spinner can cause flicker. The interface may show the spinner for a fraction of a second and remove it immediately. That change makes the screen feel less stable than showing no spinner at all. A common approach is to delay the spinner briefly. If the request finishes before the delay, cancel the spinner.
function showAfterDelay(delayMs: number, show: () => void): () => void {
const id = setTimeout(show, delayMs);
return () => clearTimeout(id);
}
const cancelSpinner = showAfterDelay(300, () => {
console.log("show spinner");
});
// Call this when the request finishes before 300 ms.
cancelSpinner();The delay is a design choice, not a rule. Test it with realistic network conditions and device speeds.
Preserve orientation
Users understand a wait better when the layout stays recognizable. Keep headings, controls, and known content in place when possible. A placeholder that matches the final content shape is called a skeleton screen. It can reduce layout movement, but it should not imitate content so closely that users mistake it for real data.
Do not use a progress bar when you cannot estimate progress. An indeterminate indicator communicates “work is continuing.” A determinate indicator communicates “work is 60% complete,” so an inaccurate percentage damages trust.
Optimistic feedback is another approach. The interface shows a likely result before the server confirms it, such as immediately marking a message as liked. Use it only when the action is quick to reverse and the interface can explain or repair failure.
Review the waiting experience
Test the screen with a fast connection, a slow connection, and a request that never finishes. Check whether users can tell that work started, whether they can still use unaffected content, and whether the interface prevents duplicate actions. A loading state that works only on a fast developer connection is incomplete.
Exercise
A dashboard refresh takes two seconds, but the existing data remains useful. Should the design replace the dashboard with a full-page spinner?
Show answer
No. Keep the existing dashboard visible, mark the relevant region as updating, and provide local feedback until the refreshed data arrives.