Skip to content
界面图谱Interface Atlas
☰
中文
ComponentsFeedback / Loading

Progress Bar

进度条

Aliases:进度条加载进度进度指示条百分比进度条上传进度条linear progress显示百分之多少的横条

What is it

A loading indicator where a horizontal bar fills left to right to express task completion, usually with a percentage or step label. For determinate tasks with predictable duration: uploads, downloads, installs and multi-step forms.

Interactive playground

Try it. Make an informed choice.

Compare determinate progress with an indeterminate indicator.

Loading lab…

What to look for

  • 01Show percentages only when the total is known.
  • 02Follow completion with a clear success or failure message.

✓ When to use

  • Determinate tasks with known duration (upload, export)
  • Step position in a multi-step flow
  • Tasks over 3 seconds where magnitude matters

✕ When not to use

  • Indeterminate duration — use a spinner or skeleton
  • Very short tasks — just let them finish
  • Unknown progress — show indeterminate rather than faking it

Variants

Determinate

确定进度

Fills by value when the ratio is known

Indeterminate

不定进度

A slider loop: working, duration unknown

Labeled

带标签

Percentage or step text beside the bar

Implementation

widthtransitionbackground-colorborder-radius@keyframes

Fixed-height (4–8px) rounded track; fill transitions by width percentage or transform scaleX; indeterminate loops a small block with keyframes. Bind to real progress events — prefer indeterminate over a fake bar. Accessibility: role="progressbar" with aria-valuenow / aria-valuemin / aria-valuemax.

Platform API

<progress>role="progressbar"aria-valuenow

In code

The exact names this thing goes by in each ecosystem — use the row that matches your project.

FrameworkName
ARIArole="progressbar"
HTML<progress>
shadcn/uiProgress
MUILinearProgress
Progress Bar进度条Skeleton Loading骨架屏Loading Spinner加载指示器
InterruptionLow — inline, hides nothingLow — layout unchangedLow — minimal footprint
Information volumeMedium — shows proportion remainingLow — structure onlyLow — busyness only
Suitable duration3+ seconds, determinate1–3 seconds1–5 seconds
Result consistencyHigh — must reflect real progressHighLow — no shape of the result

Related concepts

Loading Spinner加载指示器

A continuously rotating ring or dots that says "work in progress". Tiny in footprint and universally understood, it fits inside buttons, cursors or small regions as lightweight feedback. It communicates busyness only — neither progress amount nor time remaining.

MotionAlternative
Skeleton Loading骨架屏

Grey placeholder blocks that mirror the real content structure while loading, usually with a subtle shimmer or pulse. It tells users "content is coming and it will look like this" instead of a blank page or a bare spinner.

PatternsAlternative
Number Counter数字滚动

Animates a number from zero (or a previous value) up to its target, so the counting itself tells the story of growth. Common on dashboard KPIs, stats sections and milestones ("100k users") — the digit becomes the animation, far more persuasive than a static figure.

MotionUsed with
Optimistic UI乐观界面

Update the interface immediately as if the operation will succeed while the real request runs in the background; settle on success, roll back to the original state with a notice on failure. It solves the "wait for the server on every action" problem — trading brief uncertainty for a zero-latency feel, ideal for frequent light actions like likes and bookmarks.

PatternsUsed with

Applicable styles

Sources

Markdown for agents · JSON