Skip to content
IndexRequest a UIAboutContact

Indeterminate to Determinate Progress

A progress bar that starts as an unknown-length shimmer, then switches to a real percentage once the total is known.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Clean UI mockup showing three states of one progress bar stacked vertically in a light theme: the top bar with a short blue segment in the middle of a pale track and the label Preparing, the middle bar filled 62 percent in blue with the label 62 percent and 12 seconds left, the bottom bar full in green with a check mark and the label Done, flat modern style, rounded ends. Negative: gradients, 3D, clutter, text errors, device frames. Reduced motion: static design.

About this pattern

Definition

When you do not know how long something takes, an indeterminate bar tells people it is working. As soon as the size is known, switching to a determinate bar with a real percentage gives them a sense of time left. The switch should be smooth, never jumping back and forth.

Purpose & UX principles

  • Start indeterminate: a moving segment or stripe, with role progressbar and no aria-valuenow.
  • When the total is known, set aria-valuenow and animate the fill from the current position.
  • Never move the percentage backwards.
  • End with a clear done state and a short confirmation.

Interaction states

  • Start the demo; it prepares, then reports percentages, then finishes.

Motion specification

  • The stripe moves continuously while indeterminate.
  • Reduced motion: the indeterminate state is a static striped bar with the text Preparing.

Responsive behaviour

  • Announce changes politely, not for every percent.
  • Offer Cancel for long tasks.

Code

HTML
<div class="bx"><div class="pb" id="pb" role="progressbar" aria-label="Processing file" aria-valuemin="0" aria-valuemax="100"><i id="fl"></i></div><p class="out" id="out" role="status"></p><div class="two"><button class="mini" id="go" type="button">Start</button><button class="mini" id="cn" type="button" disabled>Cancel</button></div></div>

Related patterns

Progress Indicator

↗
Progress IndicatorLoading & Progress

Upload Progress & Retry

↗
Upload Progress & RetryLoading & Progress

Loader Variants

↗
Loader VariantsLoading & Progress