Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Progress

A headless progress bar component for building determinate, indeterminate, and buffered loading indicators. Uses createProgress internally, which delegates segment tracking to createModel.

Usage

The Progress supports single-value and multi-segment modes. Bind a number for a single bar, or an array for multiple segments.

Anatomy

Anatomy
<script setup lang="ts">
  import { Progress } from '@vuetify/v0'
</script>

<template>
  <Progress.Root>
    <Progress.Label />

    <Progress.Track>
      <Progress.Fill />

      <Progress.Buffer />
    </Progress.Track>

    <Progress.Value />

    <Progress.HiddenInput />
  </Progress.Root>
</template>

Examples

Recipes

Indeterminate State

When no value is provided (or all segment values are 0), the progress is indeterminate. Use data-state to apply CSS animations:

vue
<template>
  <Progress.Root>
    <Progress.Track class="relative h-2 w-full overflow-hidden rounded-full bg-neutral-200">
      <Progress.Fill class="h-full rounded-full bg-blue-500 data-[state=indeterminate]:animate-pulse data-[state=indeterminate]:w-full" />
    </Progress.Track>
  </Progress.Root>
</template>

Custom Value Format

Override the default ${percent}% display via the scoped slot:

vue
<template>
  <Progress.Value v-slot="{ total, percent }">
    {{ total }} of 100 ({{ Math.round(percent) }}%)
  </Progress.Value>
</template>

Form Integration

Set name on Root to auto-render a hidden input for form submission:

vue
<template>
  <Progress.Root v-model="value" name="upload-progress">
    <Progress.Track>
      <Progress.Fill />
    </Progress.Track>
  </Progress.Root>
</template>

Data Attributes

Style states without slot props:

vue
<template>
  <Progress.Fill class="data-[state=indeterminate]:animate-pulse transition-all" />
</template>
AttributeValuesComponents
data-statedeterminate, indeterminateRoot, Track, Fill, Buffer
data-completetrueRoot
data-buffertrueBuffer
data-indexnumberFill

Accessibility

The Root component manages ARIA attributes automatically.

ARIA Attributes

AttributeValueNotes
roleprogressbarApplied to Root
aria-valuenowCurrent totalOmitted when indeterminate
aria-valueminMin valueFrom Root’s min prop (default 0)
aria-valuemaxMax valueFrom Root’s max prop (default 100)
aria-valuetext${percent}%Omitted when indeterminate
aria-labelledbyLabel IDLinks to Progress.Label
aria-busytrueSet when indeterminate
data-statedeterminate / indeterminateReflects current mode
data-completetrueWhen total >= max
Was this page helpful?

Ctrl+/