Progress Bar

Alignment target:@astryxdesign/core v0.7.1 · ProgressBar

Progress

Usage #

ProgressBar shows the completion ratio of an operation.

Vue
<script setup lang="ts">
import { ProgressBar } from '@astryx-vue/core/ProgressBar'
</script>

<template>
  <ProgressBar :value="60" label="Upload" show-value />
</template>

Anatomy

ElementDescription
Progress barContainer arranging the label row and progress track.
LabelText naming the operation, optionally hidden visually while remaining accessible.
Value textFormatted determinate value shown beside the label when requested.
TrackRemaining-progress rail that carries the progressbar semantics.
FillPainted segment showing completed progress or indeterminate movement.
MarkLabeled target tick positioned on a determinate track.

Best practices #

GuidancePractices
DoChoose a color variant that matches the context: accent for general progress, success for completion, warning or error for alerts.
Don'tPlace icons or labels inside the bar; compose them alongside it using layout components.
Don'tUse multiple progress bars stacked together for the same operation; use one bar with a value label instead.

Examples #

Progress Bar — Custom format

Disk usage
1.8 GB remaining
Open in Playground

formatValueLabel turns the current value and max into a label such as disk usage in GB.

Progress Bar — Indeterminate

Loading...
Open in Playground

isIndeterminate is for work whose duration is unknown.

Progress Bar — Semantic variants

Accent
Positive
Warning
Negative
Neutral
Open in Playground

Accent, success, warning, error, and neutral, stacked so the status colors can be compared.

Progress Bar — Value label

Storage used
Open in Playground

hasValueLabel shows the current percentage beside the label.

Progress Bar — Marks

Upload
Open in Playground

Marks use the same scale as the bar. A mark on the fill uses the fill foreground; a mark still on the track uses the text color. Hover or focus reads its name.

Accessibility #

A progress bar has no focusable element, so screen reader users rely on the ARIA attributes the component exposes to learn the current progress. The component therefore puts role="progressbar" on the track and fills in the progress values and name, so assistive technologies can announce it accurately:

  • The progress range is described by aria-valuemin and aria-valuemax, which the component sets automatically from min and max.
  • The current progress is described by aria-valuenow, which is also set automatically.
  • When label is provided, the label is linked to the track through aria-labelledby.
  • When description is provided, the description is linked to the track through aria-describedby.

When isIndeterminate is true the progress is unknown, so the component removes aria-valuenow and screen readers announce the bar without a specific value.