Progress

Web/Mobile

Displays an indicator showing the completion progress of a task.

Installation

pnpm dlx cubix-ui@latest add progress --base radix

Usage

Import
import { Progress } from "@/components/cubix/progress"
Example
<Progress value={33} aria-label="Upload" />

Composition

Use ProgressLabel and ProgressValue to add a label and value display.

 
import {
  Progress,
  ProgressLabel,
  ProgressValue,
} from "@/components/cubix/progress"

<Progress value={56} className="w-full max-w-sm">
  <ProgressLabel>Upload progress</ProgressLabel>
  <ProgressValue />
</Progress>
 
Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
    └── ProgressIndicator

Progress Bar

Label

Use ProgressLabel and ProgressValue to add a label and value display.

Upload progress56%

Controlled

A progress bar controlled by a slider.

File Upload List

  • document.pdf
    2m 30s
  • presentation.pptx
    45s
  • spreadsheet.xlsx
    5m 12s
  • image.jpg
    Complete

API Reference

See also the Base UI Progress documentation for primitive props.

Progress

PropTypeDefaultDescription
valuenumber | null-Current progress. Use null for an indeterminate state (Base UI).
maxnumber100Maximum value of the progress bar.
minnumber0Minimum value of the progress bar (Base UI).
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).
childrenReact.ReactNode-Optional ProgressLabel and ProgressValue rendered above the track.

ProgressLabel

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).
childrenReact.ReactNode-The label text for the progress bar.

ProgressValue

PropTypeDefaultDescription
children((formattedValue: string | null, value: number | null) => React.ReactNode) | null-Optional render function for custom formatting (Base UI). Defaults to a percentage string.
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

ProgressTrack

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).
childrenReact.ReactNode-Usually a ProgressIndicator.

ProgressIndicator

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).