Progress

Displays an indicator showing the completion progress of a task.

x

Installation

pnpm dlx cubix@latest add progress

Usage

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

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

x
x
x
x
x

Label

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

Upload progress
x

Controlled

A progress bar that can be controlled by a range input.

x

File Upload List

  • document.pdf
    x
    2m 30s
  • presentation.pptx
    x
    45s
  • spreadsheet.xlsx
    x
    5m 12s
  • image.jpg
    x
    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).