Components

Progress

Displays a value indicating completion of a task.

An accessible progress bar with ARIA role progressbar. Supports determinate values, indeterminate state (when value is null), and both horizontal and vertical orientations.

Anatomy

  • #indicator — the filled portion of the track

Usage

Upload progress65%
Indeterminate

Examples

Custom indicator

Use #indicator to render your own fill element using the exposed percentage.

<template>
  <Progress v-model="value" class="progress-track">
    <template #indicator="{ percentage }">
      <div class="progress-fill" :style="{ width: `${percentage}%` }" />
    </template>
  </Progress>
</template>

Indeterminate state

Set the model value to null to indicate an unknown duration.

<script setup lang="ts">
const value = ref<number | null>(null);
</script>

<template>
  <Progress v-model="value" aria-label="Loading…" class="progress-track" />
</template>

Custom range

<template>
  <Progress v-model="score" :min="0" :max="10" />
</template>

Custom value label

<template>
  <Progress
    v-model="value"
    :get-value-label="(v, max) => `${v} of ${max} items processed`"
  />
</template>

Vertical orientation

<template>
  <Progress v-model="value" orientation="vertical" class="progress-track-vertical" />
</template>

API Reference

Props

PropTypeDefaultDescription
modelValuenumber | nullnullCurrent progress value. null = indeterminate.
minnumber0Minimum value.
maxnumber100Maximum value.
orientation"horizontal" | "vertical""horizontal"Orientation of the progress bar.
ariaLabelstringAccessible label when no visible label is present.
getValueLabel(value: number | null, max: number) => stringCustom function to generate the aria-valuetext.
uiProgressUiCSS class overrides.

Slots

SlotScoped propsDescription
indicator{ value, percentage, max, min, state }The filled indicator element. state is "indeterminate" when value is null.

UI Options

KeyDescription
rootThe outer track element.
indicatorThe fill indicator element.