Progress Bar

New

Horizontal indicator for upload or processing progress.

Usage

Use a progress bar to show how far along an operation is, like a file upload, an import or a transcription. Set value when the operation reports how far along it is. Set indeterminate while it runs without one.

DtProgressBar draws only the track and the fill. It has no slots: put a label or value beside it and connect them with aria-labelledby. See Value readout.

Do

  • Set value whenever the operation reports how far along it is.
  • Start indeterminate, then set value on the same bar when the first value arrives.
  • Name the operation with aria-labelledby or aria-label, like "Uploading recording.mp3".
  • Pair critical, warning and positive with text or an icon that says the same thing.

Don’t

  • Don't fake progress with a timer that creeps toward 100. Use indeterminate until real values arrive.
  • Don't leave an indeterminate bar moving beside content people are using for more than about 5 seconds.
  • Don't use it for a value that isn't a task's progress, like storage used or a rating.
  • Don't add inline margins. Space it with the parent's gap or padding.

Choosing a progress indicator

DtProgressBar DtProgressCircle DtLoader
Shows One operation's progress, as a value or indeterminate The same, in a small fixed space That something is loading, with no value
Size Fills its container's width 12px to 48px 12px to 48px; takes the text color
Switches to a value Yes, in place Yes, in place No
Role progressbar progressbar img, named "loading"
Typical place Upload row, import dialog, page region Attachment thumbnail, file list row Button, small component, overlay

Use an indeterminate DtProgressBar or DtProgressCircle when:

  • The operation will report progress, and you're waiting for the first value.
  • The indicator stands for one operation, like one file upload.

Use DtLoader when:

  • The wait has no measurable progress, like fetching data, saving a form or waiting for a reply.
  • The indicator sits inside a button or inline with text. DtButton's loading prop shows one for you.

Don't:

  • Use an indeterminate DtProgressBar or DtProgressCircle for a wait that will never report a value. Screen readers announce it as a progress bar that never moves.
  • Swap a DtLoader for a DtProgressBar when the first value arrives. Turn off indeterminate and set value on the same component instead, so it doesn't jump or remount.

Use a progress bar when the indicator can span its container, like an upload row, a card or a dialog. Use a progress circle in a small fixed space, like over a thumbnail or beside a file name in a dense list. Don't show both for the same operation.

DtProgressBar can look like a DtSlider, but it does the opposite job. DtSlider is an input: people set the value with a focusable thumb (role="slider"). DtProgressBar is output: the app reports how far an operation has got, and the bar isn't focusable (role="progressbar"). Choose by who controls the value, and don't style one to look like the other.

Demo

Variants

Value

value takes a number from 0 to 100.

Indeterminate

Set indeterminate while an operation runs but can't report a value yet. A segment runs between the ends of the track and back for as long as the bar is shown, narrow at each end and widest through the middle, and aria-valuenow is left out. When indeterminate turns off, the same bar switches to the value. See Indeterminate, then determinate.

Kind

kind sets the filled progress color over the same track. Use default unless the bar needs to carry meaning.

  • default: Most progress, like an upload or an import.
  • positive: The operation finished. Set it when the value reaches 100.
  • warning: The operation is still running but needs attention, like a slow connection or a retry.
  • critical: The operation failed, like an upload that errored.
  • info: Progress that sits beside the main task, like a background sync.
  • brand: Progress that's the focus of a Dialpad-branded moment, like setup or onboarding.
  • ai: Work an AI feature is doing, like generating a summary or transcribing a call.

Size

size sets the bar's thickness: 100 (2px), 200 (4px, the default), 300 (8px) and 400 (12px). The minimum dot, the gap before 100% and the indeterminate segment all scale with it. These numbers don't line up with DtProgressCircle's sizes, which set a diameter on the icon scale.

Behavior

Small and nearly complete values

Any value above 0 shows at least a dot as wide as the bar is thick, so a small value never disappears. Any value below 100 leaves a dot of track at the end, so the bar only looks full at exactly 100.

Values outside 0–100 log a warning in development and are clamped, including aria-valuenow.

Right-to-left

In a right-to-left layout, the fill grows from the inline-start edge (aka right in RTL), and the indeterminate segment's motion is mirrored.

Examples

Indeterminate, then determinate

Start indeterminate until the first progress event arrives, then switch over in place. At 100%, set kind="positive". A polite status region outside the bar announces the result, because the bar won't.

This example uses this Vue setup:

import { computed, ref } from 'vue';

const uploaded = ref(null); // null until the first progress event
const uploadDone = computed(() => uploaded.value === 100);

// In your upload's progress handler: uploaded.value = Math.floor(event.loaded / event.total * 100);

Value readout

DtProgressBar doesn't draw its value. Render the readout from the same number you pass to value, so the two always agree.

The value beside the bar. The bar takes the room the value leaves.

A label above, and the value at the end. The visible label names the bar through aria-labelledby.

A readout that isn't a percentage. aria-valuetext replaces the announced percentage with the same words people see.

Docked to a container's edge

Set :rounded="false" when the bar runs edge to edge, like along the top of a card. The track, the fill and the indeterminate segment get square ends.

When a bar stands for a whole card loading, set aria-busy="true" on the card and point the card's aria-describedby at the bar. When loading finishes, remove aria-busy and the bar.

Accessibility

  • DtProgressBar renders role="progressbar" with aria-valuemin="0", aria-valuemax="100" and aria-valuenow set to value. The minimum dot and the end gap are visual only; aria-valuenow reports the real value.
  • Give every bar a name. Use aria-labelledby when a visible label exists, and aria-label otherwise. Name the operation, like "Uploading recording.mp3", not the value: screen readers announce the value on their own. In development, the console logs a message when neither is set.
  • For a value that isn't a percentage, pass aria-valuetext with the same words as the visible readout, like "3 of 10 files".
  • While indeterminate, aria-valuenow is left out, so assistive technology reports the progress as unknown.
  • The bar isn't focusable and isn't a live region, so screen readers don't announce value changes. Announce the outcome, like "Upload complete" or "Upload failed", in a polite role="status" region. Don't announce every value.
  • When the bar describes a region that's loading, set aria-busy="true" on the region and point its aria-describedby at the bar. See Docked to a container's edge.
  • With reduced motion, the fill stops animating between values, and the indeterminate segment pulses in the middle of the track instead of moving, so it never reads as a value.
  • In forced colors mode, the track gets a GrayText outline and the fill uses Highlight.
  • An indeterminate bar moves on its own for as long as it's shown. Beside content people are using, keep it under about 5 seconds, or switch to value or a text status (WCAG 2.2.2).
  • critical, warning and positive show status through color alone. Pair them with text or an icon (WCAG 1.4.1).

Vue API

import { DtProgressBar } from '@dialpad/dialtone-vue';

Props

Name
Default
Type
ariaLabel
string

Accessible label read by screen readers. Use aria-labelledby instead when a visible label exists.

indeterminate
false
"true" | "false"

Shows a looping segment instead of a value, and omits aria-valuenow.

kind
'default'
"default" | "brand" | "critical" | "positive" | "warning" | "info" | "ai"

The color variant of the progress bar.

rounded
true
"true" | "false"

Whether the bar's ends are rounded.

size
200
"100" | "200" | "300" | "400"

Thickness of the bar

value
0
number

Current progress value (0–100). Out-of-range values warn and are clamped. Ignored while indeterminate.

Classes

Class
Applies to
Description

Progress Bar documentation last updated Tuesday, December 1, 2026