Components
Progress
Displays completion status for a task or upload.
Installation
$ npx veil-ui@latest add progressUsage
import { Progress } from "@/components/ui/progress";
<Progress value={60} aria-label="Upload" />;Examples
Basic
With label
Uploading assets68%
Sizes
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | — | Completion between 0 and 100. Null renders an indeterminate bar. |
| max | number | 100 | Upper bound of the value. |
| ...props | Radix Progress.Root props | — | Includes getValueLabel and aria-* attributes. |
Accessibility
- Radix exposes
role="progressbar"witharia-valuemin,aria-valuemaxandaria-valuenowautomatically. - Always pass an accessible name with
aria-labeloraria-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>