Veil UI
Components

Progress

Displays completion status for a task or upload.

Installation

$ npx veil-ui@latest add progress

Usage

import { Progress } from "@/components/ui/progress";

<Progress value={60} aria-label="Upload" />;

Examples

Basic

With label

Uploading assets68%

Sizes

API reference

PropTypeDefaultDescription
valuenumber | null—Completion between 0 and 100. Null renders an indeterminate bar.
maxnumber100Upper bound of the value.
...propsRadix Progress.Root props—Includes getValueLabel and aria-* attributes.

Accessibility

  • Radix exposes role="progressbar" with aria-valuemin, aria-valuemax and aria-valuenow automatically.
  • Always pass an accessible name with aria-label or aria-labelledby.
  • The visible percentage next to the bar should be text, not an image, so it can be read and zoomed.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add progress --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { ProgressIndicator, ProgressRoot } from "reka-ui";
import { computed } from "vue";

import { cn } from "@/lib/utils";

const props = defineProps<{ class?: string; value?: number | null }>();

const offset = computed(() => `translateX(-${100 - (props.value ?? 0)}%)`);
</script>

<template>
  <ProgressRoot
    data-slot="progress"
    :model-value="value ?? 0"
    :class="
      cn('relative h-1.5 w-full overflow-hidden rounded-full bg-primary/15', props.class)
    "
  >
    <ProgressIndicator
      data-slot="progress-indicator"
      class="h-full w-full flex-1 rounded-full bg-primary transition-transform duration-300 motion-reduce:transition-none"
      :style="{ transform: offset }"
    />
  </ProgressRoot>
</template>

On this page