Skip to content

Progress ​

Displays an indicator showing the completion progress of a task — as a bar, a segmented bar, a ring or a gauge.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Sizes ​

sizing: 'sm' | 'default' | 'lg', or any thickness; showValue adds the percentage.

Approximate web preview — the HarmonyOS rendering is the reference.

Tones ​

default | success | warning | info | destructive; valueText replaces the percentage.

Approximate web preview — the HarmonyOS rendering is the reference.

Buffer, stripes, steps, indeterminate ​

The indeterminate bar slides forever on its own node; toggle it to see it stop.

Approximate web preview — the HarmonyOS rendering is the reference.

Circle ​

shape: 'circle' — size, thickness, value / caption / custom centre, indeterminate spin.

Approximate web preview — the HarmonyOS rendering is the reference.

Gauge ​

shape: 'gauge' — a 240° meter for levels and quotas.

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

SProgress ​

shadcn-vue Progress, extended with the forms a design system usually needs.

  • linear (default): h-2 w-full rounded-full bg-primary/20 track, bg-primary indicator whose width animates to value / max. Extras: sizing / thickness, buffer (a lighter second bar, e.g. buffered video), striped (+ animated), segments (a stepped bar of N parts) and indeterminate (a sliding bar).
  • circle: a ring (diameter, thickness) with the value (showValue / valueText), a caption or any slot content in its centre; indeterminate spins a quarter arc.
  • gauge: a 240° meter with the same centre content.

tone colours the indicator: default (primary) | success | warning | info | destructive.

Infinite motion (indeterminate, moving stripes) lives on its own child node and stops when that node is removed; with motion disabled (--motion-progress-enabled: false) a static state is shown instead.

PropTypeDefaultDescription
valuenumber00…max
maxnumber100
labelstring | undefinedundefinedAccessible name.
shapeProgressShape
ProgressShape = 'linear' | 'circle' | 'gauge'
'linear'
sizingProgressSize
ProgressSize = 'sm' | 'default' | 'lg'
'default'
thicknessnumber | undefinedundefinedBar height / ring stroke in vp; overrides the sizing preset.
diameternumber | undefinedundefinedRing / gauge diameter in vp; overrides the sizing preset.
toneSparkTone
SparkTone = 'default' | 'success' | 'warning' | 'info' | 'destructive'
'default'
indeterminatebooleanfalseUnknown duration: sliding bar (linear) or spinning arc (circle).
buffernumber | undefinedundefinedlinear: secondary (buffered) value, 0…max, drawn lighter behind the indicator.
stripedbooleanfalselinear: diagonal stripes on the indicator.
animatedbooleanfalselinear + striped: the stripes move.
segmentsnumber0linear: split the track into N equal parts (steps). 0 = continuous.
showValuebooleanfalseShow the value: right of a bar, in the centre of a ring / gauge.
valueTextResourceStr | undefinedundefinedCustom value text (default "66%"). Implies showValue.
captionResourceStr | undefinedundefinedring / gauge: small muted text under the value.
tokensProgressTokens{}Per-instance token overrides, see {@link ProgressTokens}.

Slots: children (trailing closure)

MIT Licensed