Skip to content

Progress ​

Shows task progress, supporting line / circle / dashboard forms, status colors, indeterminate state, custom colors and text, stripes, step segments, buffer segments, and more.

Basic usage ​

Basic usage

percent is the current progress value (default range 0–100, clamped automatically); when it reaches 100 with no status set, success green is shown. value is an alias of percent (percent wins when both are set), so writing value works the same.

Status ​

Status

status supports success (green) / warning (orange) / error (red) semantic colors, taking priority over the automatic success green at 100%.

Hidden text ​

Hidden text

no-text hides the side/center percentage; show-text="false" is equivalent.

Circle progress ​

Circle

The circle defaults to a 48px diameter and 6px stroke, showing the percentage in the center; type="circle" switches the form.

Circle size & stroke width ​

Size / stroke width

Circle status ​

Circle status colors & status icons

status="success|error|warning" recolors the ring and replaces the center percentage with the matching status icon (✓ / ✗ / alert, real SVG icons); the success icon also shows at 100% without an explicit status.

Dynamic progress ​

Dynamic progress

Start simulated task

Indeterminate ​

Indeterminate loading

indeterminate means "in progress with unknown duration": it ignores percent / steps / buffer / striped; line shows a sweeping bar, circle / dashboard a rotating arc; aria-valuenow is removed per the APG. The label attribute provides an accessible name for screen readers (invisible).

Dashboard ​

Dashboard

75/128G

type="dashboard" is a gauge form with a bottom opening (270° usable arc); size / stroke-width / status / color / stroke-linecap work the same as circle; the default slot projects into the gauge center (e.g. 75/128G above).

Custom colors ​

color / track-color

color / track-color accept 11 preset palette names (theme tokens, dark-adaptive) or any CSS color string; color also accepts gradient strings (line form recommended — ring strokes cannot consume linear-gradient() background syntax). An explicit color takes priority over status colors.

Custom text ​

Default slot custom text

2m 10s left35MB / 200MB downloaded3/5Good

The default slot overrides the built-in percentage: line projects into the side text area, circle / dashboard into the center, and takes priority over status icons.

Stripes ​

striped / striped-flow

striped overlays diagonal stripes (density adapts to track height); striped-flow animates them (implies striped when used alone); line form only.

Steps ​

steps segments

Next stepStep 1 / 4

steps splits the line into N equal segments (gap overridable via --oas-progress-step-gap); the lit count follows percent with rounding; line form only.

Buffer ​

buffer (video/download)

Play (simulated buffering)Played 10% / Buffered 35%

buffer (same value range as percent) renders a light buffer segment on the track with the main progress on top; line form only.

Line thickness & inside text ​

size / stroke-width / text-inside

For the line form, size is a height tier (small 4px / medium 8px / large 12px) and stroke-width sets the track height directly (px, priority over tiers); text-inside moves text into the bar (track height auto-lifts when not explicitly set); the label sits inside the filled segment only and hides when the fill is too narrow (under ~6ch), so no half-digit ever shows over the track.

Vertical progress ​

vertical turns the line form vertical: the track becomes a column, thickness still comes from the size / stroke-width tiers, and the fill grows bottom-up. height sets the vertical length (plain numbers are px; vh/% units are accepted; invalid values fall back to the default 200px; the attribute is ignored in horizontal mode). circle / dashboard are unaffected by vertical.

vertical progress

Linecap ​

stroke-linecap

stroke-linecap controls the progress arc cap of circle / dashboard: round (default) / butt; not applicable to the line form.

Value range ​

max

120MB / 200MB45 / 60 min (value alias)

max defines the full value (default 100): percent / buffer mean "current value" (clamped to 0–max), width and percentage are computed as value / max, and aria-valuenow / aria-valuemax sync real values.

Accessibility ​

  • role="progressbar" + aria-valuenow / aria-valuemin / aria-valuemax sync across forms; aria-valuenow is removed in the indeterminate state per the APG.
  • The label attribute writes aria-label, giving screen readers a readable name (invisible; see the "Indeterminate" demo).
  • Component CSS variable openings: --oas-progress-color / --oas-progress-track-color / --oas-progress-height / --oas-progress-buffer-color / --oas-progress-stripe-color / --oas-progress-stripe-size / --oas-progress-step-gap / --oas-progress-inside-color / --oas-progress-duration.

API ​

oas-progress ​

Attributes ​

AttributeDescriptionTypeDefault
bufferBuffer value (line only, clamped to 0–max): static buffered segment behind the main bar for streaming/loading scenariosstring—
colorProgress color: preset name (via --oas-preset-* tokens) or any CSS color/gradient string (gradients recommended for line); wins over status colors and the full-value greenstring—
heightVertical length (vertical only): plain numbers are px; px/vh/% accepted; invalid falls back to the defaultstring—
indeterminateIndeterminate loading: ignores percent/steps/buffer/striped and drops aria-valuenow (APG); sweeping bar (line) or rotating segmented arc (circle/dashboard)boolean—
labelAccessible name (written to the progress bar aria-label)——
maxValue range upper bound (default 100): percent/buffer read as current values; width and text are computed as value/max and aria reflects real valuesstring100
no-textHide the side/center percentage textboolean—
percentProgress percentage (0–100, clamped automatically)string0
show-textWhether to show the percentage textstringtrue
sizeSize: line = height preset small(4px) / medium(8px, default) / large(12px); circle/dashboard = diameter in px (default 48)string48
statusStatus color; error red, success green; when unset and progress reaches 100, success green is shownstring—
stepsStepped segments (line only): integer ≥2 equal segments; lit count = round(percent × steps)string—
stripedStriped texture (line only)boolean—
striped-flowAnimated flowing stripes (line only; implies striped when used alone)boolean—
stroke-linecapArc line cap round (default) / butt (circle/dashboard)stringround
stroke-widthStroke width in px: circle/dashboard ring thickness (default 6); line track height (wins over the size preset)string6
text-insideText inside the bar (line only; the track auto-grows to fit text when no explicit thickness is set)boolean—
track-colorTrack color: same protocol as colorstring—
typeShape: line (default) / circle / dashboard (gauge: 270° arc open at the bottom)stringline
valueAlias of percent (current value, clamped to 0–max): when both are set percent wins; read only when percent is absentstring0
verticalVertical orientation (line form only): vertical track filling bottom-up; circle/dashboard unaffectedboolean—

Slots ​

NameDescription
defaultCustom text: right of the line / inside the bar (text-inside) / circle center; wins over status icons and the built-in percentage

CSS Variables ​

CSS VariableDefault
--oas-progress-buffer-colorcolor-mix(in srgb, var(--oas-progress-color, var(--oas-color-primary)) 35%, transparent)
--oas-progress-colorvar(--oas-color-primary)
--oas-progress-duration1.2s
--oas-progress-heightvar(--oas-space-2)
--oas-progress-inside-colorvar(--oas-color-bg)
--oas-progress-step-gapvar(--oas-space-1)
--oas-progress-stripe-colorvar(--oas-color-bg)
--oas-progress-stripe-sizecalc(var(--oas-progress-height, var(--oas-space-2)) * 2.5)
--oas-progress-track-colorvar(--oas-color-bg-hover)

role="progressbar" + aria-valuenow / aria-valuemin / aria-valuemax (synced for both line and circle).

Released under the MIT OR Apache-2.0 License.