Skip to content
Glint UI

Progress

A determinate bar, and the wait that has a bar but not yet a percentage.

Usage

import { Progress } from "@glint/components/progress.slint";
import { Tokens } from "@glint/theme/tokens.slint";
export component AppWindow inherits Window {
width: 560px;
height: 200px;
background: Tokens.color-background;
VerticalLayout {
alignment: center;
padding: 24px;
Progress {
value: 40;
minimum: 0;
maximum: 100;
}
}
}

Progress communicates the completion status of a process. ProgressLabel and ProgressValue format the descriptive name and computed percentage alongside the bar.

Examples

Indeterminate

Set indeterminate: true when the progress is ongoing but total duration or percentage is unknown.

Custom ranges

Provide domain-specific numbers using minimum and maximum. The bar computes percent automatically.

API Reference

Properties

PropertyTypeDefaultDescription
valuein float0Current value, in whatever units minimummaximum names. Ignored while indeterminate.
minimumin float0The range value lives in. Raw domain numbers bind straight in — three steps of seven is minimum: 0; maximum: 7; value: 3, published as such, which is what assistive technology reads out as "3 of 7". The 0–100 default keeps a percentage a percentage.
maximumin float100
indeterminatein boolfalseThe work has started but its size is unknown: the fill gives way to a sweeping band and the control reports no value.
periodin duration1.4sTime for one sweep of the band across the track.
phaseout floatno defaultWhere the band sits: 0 with its trailing edge at the left of the track, 1 with its leading edge past the right. Public for the same reasons Spinner's rotation is — a host can drive matching motion from the same phase, and a test can watch the band actually move.
percentout floatno defaultHow far along that is as a fraction of the track, 0–100. Public because the track's own units are the consumer's: this is the number ProgressValue rounds, and the one a host drives a matching bar from.

ProgressLabel

The caption beside a bar: what the work is. It carries the library’s own type treatment, so a column of bars reads as one set rather than as whatever each call site reached for.

ProgressLabel publishes no properties, callbacks or functions of its own. What a call site can set on it is the Slint Text it inherits.

ProgressValue

The readout on the other side: how far along, as a whole percent. It takes the fraction rather than the raw value, because the bar is what knows the range — and it rounds once, here, instead of at every call site.

Properties

PropertyTypeDefaultDescription
percentin floatno defaultHow far along the bar is, 0–100. Bind it to the bar's percent.

Accessibility

  • Progress indicator role. Progress declares accessible-role: progress-indicator.
  • Value bounds. Publishes accessible-value, accessible-value-minimum, and accessible-value-maximum.
  • Indeterminate state. In indeterminate mode, accessible-value is set to an empty string per ADR-0013 to signal an unknown percentage to assistive technology.