Loading is the one animation you do not control the duration of. Everything else in interface motion is a decision; this one is imposed by the network, the database, and the user’s connection.
Which changes the problem. You are not choosing a duration. You are managing a wait. And how long a wait feels has surprisingly little to do with how long it is.
The thresholds
Three rough boundaries, and they have held up well:
Under ~1 second: no indicator. The user perceives the system as reacting immediately. Showing a spinner here actively hurts. It appears and vanishes before it can be read, producing a flash that makes the interface feel unstable rather than fast. A flash of loading state is worse than no loading state.
1 to ~10 seconds: an indicator, and their attention stays. They are willing to wait but need confirmation that something is happening. Indeterminate is acceptable.
Beyond ~10 seconds: they disengage. Attention goes elsewhere, and you now need real progress information (a percentage, a step count, a description of what is happening) plus, ideally, a way to leave and be notified.
The delay that deletes most of your loading states
The single highest-value technique here is to not show the indicator immediately.
let timer = setTimeout(() => setLoading(true), 400);
const data = await fetch(url).then((r) => r.json());
clearTimeout(timer);
setLoading(false);
render(data);
Requests that resolve in under 400ms never show anything. On a decent connection that is most of them, and the interface feels instantaneous because nothing interrupted it. Requests that take longer still get an indicator well before the user starts to wonder.
There is a matching rule on the other end: once an indicator has appeared, keep it up for a minimum period. 300–500ms is reasonable. A spinner that appears and disappears within 80ms is a flicker, and a flicker reads as a glitch. Together, these two rules eliminate nearly every janky loading state in a typical application.
Skeletons beat spinners, when you know the shape
A spinner communicates one thing: something is happening. A skeleton communicates several: something is happening, here, and it will look roughly like this.
That extra information does real work. The user starts parsing layout before content arrives, so when it does they are oriented rather than re-reading the page. Skeletons also avoid the layout shift a spinner causes when it is replaced by content of a different size. The skeleton already occupies the space.
Use a skeleton when:
- You know the shape of what is coming: a list of cards, a table, a profile
- The wait is likely over ~500ms
- The content occupies a meaningful area
Use a spinner when:
- The shape is genuinely unknown
- The area is small: a button, an inline control
- The action is not “content arriving” but “work happening”
And keep skeletons calm. The shimmer sweep is decoration, and an aggressive one draws attention to the wait, which is the opposite of the goal. A slow, low-contrast pulse (1.5–2s, subtle) is better than a fast bright sweep. You are trying to make waiting unremarkable.
Skeletons should also under-promise. Showing five skeleton rows and delivering two is a small broken promise the user notices. Two or three is a safer count than a full screen.
Optimistic updates: the fastest loading state is none
For actions where success is overwhelmingly likely and the consequence of being wrong is small, update immediately and reconcile in the background.
A like button is the canonical case. Fill the heart on tap. Send the request. If it fails, revert and say so. The user’s mental model (“I liked it”) is served instantly, and the rare failure costs a small correction rather than a universal delay.
This is the right default for saving, favouriting, marking read, reordering, toggling settings. It is the wrong default for anything with real consequences: payments, deletions, submissions. Nobody wants an optimistic checkout.
Two things make optimistic updates work rather than just feel fast: the revert has to be visible (silently rolling back is worse than the delay would have been), and the optimistic state should be visually identical to the confirmed one, or you have just invented a third state the user has to learn.
Progress bars lie, and that is allowed
Determinate progress is better than indeterminate whenever you can produce it, because it converts an unbounded wait into a bounded one. People tolerate a known ten seconds far better than an unknown three.
You rarely have honest numbers. Some accepted approaches:
- Weight by step, not by count. Five steps where one takes 80% of the time should not each advance the bar 20%.
- Never go backwards. A bar that retreats from 70% to 40% destroys trust in it entirely. If an estimate worsens, slow down rather than reverse.
- Ease toward the target rather than jumping. A bar that leaps 0 → 90 → 100 conveys nothing; one that advances smoothly reads as continuous work.
- Do not stall at 99%. If you cannot tell when it will finish, stop the bar at 90 and let completion carry it home.
Fill the wait with something useful
If a wait is genuinely long and unavoidable, the strongest move is to give the user something to do or read. Not a tip carousel nobody reads, but real work that would otherwise come next. Uploading a file? Let them fill in the title and description while it goes. Processing a signup? Collect preferences.
This is why the wait for a lift feels shorter with a mirror beside it. Occupied time feels shorter than unoccupied time, and the effect is large.
Failing that, tell them what is happening. “Compressing video” then “Uploading” then “Generating thumbnails” is a dramatically better ten seconds than a spinner, even though it is the same ten seconds. Specificity signals that the system knows what it is doing.
Reduced motion
Loading indicators are motion, and prefers-reduced-motion applies. Continuous spinning and sweeping shimmers are exactly the kind of repetitive movement the setting exists to reduce.
Substitute a static or slowly-fading indicator, or a simple text state. Do not remove the indicator entirely. The user still needs to know something is happening. Reduced motion means less movement, not less information.
If you need spinners, note that a spinner is one of the few legitimate uses of linear easing: a continuously rotating element with an eased curve visibly pulses each revolution. The animated icon sets here include a number of loaders that get this right.
The short version
- Under 1s: show nothing. Delay the indicator by ~400ms and most waits disappear.
- Once shown, keep it up for at least 300ms so it cannot flicker.
- Skeleton when you know the shape; spinner when you do not.
- Optimistic updates wherever failure is rare and cheap to undo.
- Progress bars must never move backwards.
- Beyond 10 seconds, give real information, or real work to do.
Almost none of this makes anything faster. All of it makes waiting cost less, which is the part the user actually experiences.