HextaUI

Progress: Status

variant colors only the fill or ring, so the track, label and value stay neutral.

Backup complete
x
Storage almost full
x
Upload failed
x
x
x
x
import {
  Progress,
  ProgressCircle,
  ProgressLabel,
  ProgressValue,
} from "@/components/ui/progress"

export function ProgressVariants() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-6">
      <Progress value={100} variant="success">
        <ProgressLabel>Backup complete</ProgressLabel>
        <ProgressValue />
      </Progress>
      <Progress value={86} variant="warning">
        <ProgressLabel>Storage almost full</ProgressLabel>
        <ProgressValue />
      </Progress>
      <Progress value={47} variant="destructive">
        <ProgressLabel>Upload failed</ProgressLabel>
        <ProgressValue />
      </Progress>
      <div className="flex items-center gap-4">
        <ProgressCircle value={100} variant="success" aria-label="Synced" />
        <ProgressCircle value={86} variant="warning" aria-label="Almost full" />
        <ProgressCircle value={47} variant="destructive" aria-label="Failed" />
      </div>
    </div>
  )
}

This adds the example as components/examples/progress/variants.tsx, together with the Progress component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/progress-variants.json

To add only the component, follow the Progress installation.

Props in this example

The Progress props this example sets, from the API reference.

PropTypeDefault
valuenull makes the bar indeterminate.
number | null–
variant
"default" | "success" | "warning" | "destructive""default"
PropTypeDefault
valuenull spins an arc.
number | null–
variant
"default" | "success" | "warning" | "destructive""default"

Every prop is in the Progress API reference.

See them all, with keyboard support and accessibility notes, on the Progress page.