Loading States and Skeleton UI Patterns in 2026

Loading States and Skeleton UI Patterns

Spinner, skeleton, progress bar, optimistic UI — when each fits, the 200-millisecond spinner delay, and the anti-patterns that make products feel slower than they are.

Loading is a state, not a gap. A default spinner is often not the best fit for an async operation. As rules of thumb rather than measured thresholds, spinners fit short waits under three seconds where the shape is unknown, and skeletons fit operations where the shape is known and the duration is roughly half a second to three seconds. Progress bars fit measurable, multi-step work. Optimistic UI fits high-success-rate actions like save, like, or add-to-cart, with a clear rollback path on failure. The response-time limits Nielsen Norman Group summarizes set the timing frame. What users see during a wait shapes how the wait feels, and a 200-millisecond delay before showing a spinner is one of the simplest improvements a product UI can make.

Every async operation has a loading state, whether or not the team designed one. If the team did not design one, the user gets a frozen interface, a generic spinner, or a flash of skeleton that disappears too fast to read. The complaint that follows sounds like "the app feels slow" — even when the network response itself may be fine. The user is complaining about perceived performance, which is a different metric from actual performance and responds to different design decisions.

The response-time guidance behind these patterns traces back to research from 1968, and Nielsen Norman Group's 2014 update described the guidelines as unchanged for 46 years. Nielsen Norman Group summarizes three limits, citing Robert Miller's 1968 paper and later work by Card and colleagues (1991) — 0.1 seconds feels instantaneous, 1 second is the limit for uninterrupted flow of thought, and 10 seconds is about the limit for keeping the user's attention on the task. Modern web UI lives inside those three numbers. Loading states are how you keep the user inside the second tier when the network response cannot.

This article catalogs four loading patterns for production UI, the timing rules that make each one work, and the anti-patterns that consistently make products feel slower than they are.

Loading is a state, not a gap

The framing matters. A loading state is not a placeholder for the real UI — it is the real UI for the duration of the operation. Treating it as a gap leads to spinners that flash for a hundred milliseconds, skeletons that do not match what replaces them, and full-page blockers for operations that affect a single widget.

Three things follow from the framing. First, every async operation deserves an intentional state. Not the same state for every operation — the appropriate state for that operation. Second, the default spinner is a weak default. It tells the user nothing about what is loading, how long it will take, or what shape the result will have. Third, perceived performance is a separate target from actual performance. As an illustration rather than a measured result, a skeleton that appears in twenty milliseconds and is replaced after eight hundred can read as faster than a blank screen that becomes content in six hundred, because the user spends the wait looking at content-shaped feedback.

User expectation depends on what they triggered. A click on a "save" button has a different expectation profile from a click on a "generate report" button. Save should feel instantaneous; generate report is allowed to take seconds and benefits from a visible progress indicator. The loading pattern should match the user's mental model of how long the work should take, not the actual technical duration.

Spinner: short, unknown duration

The spinner is the right answer when the wait is short — under three seconds, as a rule of thumb — and the shape of the result is unknown. A form submission round-trip. A login confirmation. A quick API call where the result might be success, error, or a redirect. The spinner says "something is happening, hold on" without committing to any specific outcome.

Three rules make spinners work. First, center the spinner on the loading element, not on the page. If the user clicked a button to save a form, the spinner belongs on the button (replacing the label) or beside it. A full-page spinner for a button click reads as the entire app freezing. Second, show the spinner after a 200-millisecond delay. Fast responses then never flash a spinner at all, which feels snappier than showing one and removing it within a frame. Third, set a timeout. A spinner that runs forever — the classic "spinner of death" — is a worse failure than a clear error message. As a rule of thumb, switch to an error state with a retry path after ten seconds.

The CSS for a calm, delayed spinner is short.

css
.button[data-loading="true"]::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0;
  animation:
    spinner-appear 1ms linear 200ms forwards,
    spin 800ms linear 200ms infinite;
}

@keyframes spinner-appear {
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

The fade-in and the rotation are separate animations on purpose. Putting opacity: 0 inside the repeating spin keyframes would restart the fade on every rotation and make the spinner blink once per cycle.

The 200-millisecond delay is the part that is easy to skip. Without it, a click that gets a fast response can still flash a spinner briefly, which the user can read as flicker. With it, fast responses are silent, and only the actually-slow operations get the spinner treatment.

Skeleton: known shape, indeterminate duration

A skeleton screen is the right answer when you know the shape of the result but not exactly how long it will take. List views, card grids, detail pages, feed UIs — anything where the layout is predictable but the data is being fetched. The user sees the structure of the page settle first; the content fills in second. The cognitive load of orienting to the page happens during the load instead of after.

Three practical rules keep skeletons honest. First, match the layout that will replace it. If the real content has three cards in a row, the skeleton shows three card-shaped placeholders in a row. If the cards have a title, two lines of text, and an image, the skeleton shows shapes for each. Mismatched skeletons — three placeholder lines when the content turns out to be five — read as broken when the swap happens. Second, use a subtle shimmer animation to signal that the skeleton is loading rather than stuck. The shimmer should be slow enough to read as ambient (around 1.5 seconds per cycle is a reasonable starting value, not a measured standard) and quiet enough that it does not dominate the page. Third, as a rule of thumb, the skeleton is for half-a-second-to-three-second waits. Below half a second, the skeleton can flash; past about three seconds, users may start to wonder if it is stuck — switch to a spinner with a label or to a progress indicator if the duration is measurable.

The CSS for a typical skeleton card is straightforward.

css
.skeleton-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: var(--color-surface);
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--color-surface-muted) 0%,
    var(--color-surface-shimmer) 50%,
    var(--color-surface-muted) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1500ms ease-in-out infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

For per-widget UIs — dashboards, feeds, multi-source pages — skeletons should be per-widget too. Each widget loads independently; the page does not block on the slowest one. A dashboard that shows nine skeletons settling into nine charts reads as a working system; the same dashboard with one full-page spinner that lifts when the last chart loads reads as broken.

Progress bar: measurable progress

A progress bar is the right answer when the duration is known and measurable. File upload, multi-step process, batch operation. The user sees how much of the work is done and can estimate how much remains. The honesty of the indicator matters — a progress bar that hangs at ninety-five percent for thirty seconds can undermine the trust the bar was meant to build.

PatternShow percentage?Show estimated time?Notes
File uploadYesOptional, only if accurateKnown size makes percent measurable
Multi-step formNo, show step count insteadNo"Step 3 of 5" reads cleaner than percent
Batch importYesYes, with "remaining" wordingLong operations benefit from time estimate
Background syncNo, indeterminate barNoUse when work is happening but progress is opaque

The estimated-time guidance needs particular care. Showing "5 minutes remaining" when the actual time turns out to be twelve can teach users to ignore the estimate. The pattern that works is showing the estimate only when you can deliver on it — a file upload with a known size and a measured upload rate, a batch operation where you have history on similar batches. When the estimate would be a guess, leave it out.

Harrison et al.'s 2007 UIST study, Rethinking the Progress Bar, covers a related finding. In that study, 22 participants from two large computer research labs compared pairs of progress bars that each ran for 5.5 seconds: bars that accelerated toward the end were perceived as faster than a linear bar, and bars with pauses near the end were perceived as slower. The authors list checking whether the findings scale to other durations as future work. The implementation trade-off is subtle. In the study, pauses and acceleration had an exaggerated effect on perceived duration when they came toward the end of the process. For work with known, static completion conditions and stable progress — the case where, the authors say, standard progress bars can generally visualize the process effectively and accurately — a linear progress bar with honest measurement is the right call, with particular care not to let it stall near the end.

Optimistic UI: assume success

Optimistic UI is the right answer when the success rate of the operation is high and the failure mode is recoverable. The pattern shows the result of the operation immediately — before the server has confirmed — and rolls back only if the server actually fails. Liking a post. Saving a form field. Adding an item to a cart. Sending a message in a chat. The perceived latency drops to near zero because the UI does not wait for the round-trip.

The pattern is framework-agnostic; for React codebases, the useOptimistic reference documents one built-in implementation. The three rules that matter in design.

First, use the pattern only when failure is rare and recoverable. Like, save, add-to-cart all qualify — failures are uncommon in a healthy system, and rollback is a small visual blip. Payment submission does not qualify — failure is meaningful, and showing a fake success would be misleading. Second, show subtle confirmation when the server actually succeeds. A small check mark, a fade to a finalized state — enough that the user sees the action was real. Without the confirmation, users sometimes second-guess whether the action actually happened. Third, failure mode must be obvious and recoverable. If the optimistic save fails, the field returns to its pre-save state with an inline error and a retry. Silent rollback that the user does not notice is a serious failure — they think they saved and they did not.

A short pattern for an optimistic like button.

js
async function onLikeClick(postId) {
  setLikedOptimistic(postId, true);
  try {
    await api.like(postId);
    setLikedConfirmed(postId, true);
  } catch (err) {
    setLikedOptimistic(postId, false);
    showInlineError("Like failed. Tap to retry.");
  }
}

Three states — optimistic (immediate), confirmed (subtle success), rolled-back (clear error with recovery). The user feels the operation as instant when it works and as a recoverable hiccup when it does not.

Loading anti-patterns

Four recurring failure modes show up in product UI often enough to name directly.

The first is full-page spinner for a single-widget update. A dashboard widget refresh that locks the entire UI reads as the app freezing. The fix is per-widget loading — each component shows its own skeleton or spinner while the others stay interactive.

The second is skeleton longer than three seconds. The shimmer animation tells the user the system is alive; past roughly three seconds, that signal can stop being convincing, and users may start to suspect the system is stuck. Switch to a spinner with a status label ("Loading...", "Still loading...", "This is taking longer than usual") or show a clearer progress indicator if you can measure progress.

The third is showing a loading state for synchronous operations that do not need it. A computation that takes ten milliseconds does not need a spinner — by the time the user perceives the spinner, the operation is done. The flash reads as lag rather than as feedback.

The fourth is hiding navigation during loading. If the user can leave the page, they should be able to do so even while the current content is loading. Hiding the navigation, the back button, or the close affordance traps the user inside a loading state — a frustrating place to be when something is taking too long.

For a vendor design system's version of this guidance, see the Material Design 3 progress indicator guidelines and check any timing recommendations it currently gives against the rules above. The principle behind all four anti-patterns is the same — the loading state should keep the user oriented and in control, not block them.

Phase 1 deliverables and acceptance criteria

Audit the spinners in the codebase. Every spinner that appears without a 200-millisecond delay should get one — it is a small change aimed directly at perceived performance. The diff is short, the user-visible change is meaningful.

Find the operations where the shape of the result is known and a spinner is being used. List views, detail pages, card grids. Swap the spinner for a skeleton that matches the shape. The first time, build the skeleton from the same component tree as the real content, with the data parts hidden — separate skeleton components add maintenance overhead that can make them hard to keep up.

Identify the high-success-rate actions — save, like, add-to-cart — that currently wait for the server. Move one of them to optimistic UI. The user-perceived improvement can be substantial, and the rollback path is short to implement.

Walk the product looking for full-page loading states. Most of them should be per-widget. Dashboard widgets, feed items, sidebar content — each one belongs to a component that should manage its own loading state.

Check the skeleton durations. By the rule of thumb above, anything that runs longer than about three seconds is too long for the skeleton pattern. Either the operation is slow enough to need a progress indicator, or the skeleton is appearing before it should — sometimes a short-circuit on cached data is the right fix instead of a different loading pattern.

Loading states are a part of product UX that is easy to leave to defaults, and when they are, users feel it as the app being slow. The four patterns above — spinner, skeleton, progress bar, optimistic UI — each fit a different kind of async operation. The right pattern depends on duration, shape, measurability, and success rate; using the same pattern for all four is what produces interfaces that feel slower than they are.

Project Inquiry