UI.MD

Progress

A progress bar that displays completion toward a task.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/progress.json

Usage

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

Examples

Default

The indicator eases to its value (300ms ease-out). Remount via key to replay the fill from zero.

x

API Reference

PropTypeDefaultDescription
valuenumber | null-Current progress from 0 to max. Pass null for an indeterminate state (the bar renders empty).
maxnumber100The value at which the bar reads full. Drives both the visual fill and the value reported to assistive tech.
getValueLabel(value, max) => string-Overrides the accessible label announced for the current value.