Progress
Displays an indicator showing the completion progress of a task.
Installation
pnpm dlx cubix@latest add progress --base radixUsage
import { Progress } from "@/components/cubix/progress"<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
└── ProgressIndicatorProgress Bar
Label
Use ProgressLabel and ProgressValue to add a label and value display.
Upload progress
Controlled
A progress bar that can be controlled by a range input.
File Upload List
- document.pdf2m 30s
- presentation.pptx45s
- spreadsheet.xlsx5m 12s
- image.jpgComplete
API Reference
See also the Base UI Progress documentation for primitive props.
Progress
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | - | Current progress. Use null for an indeterminate state (Base UI). |
| max | number | 100 | Maximum value of the progress bar. |
| min | number | 0 | Minimum value of the progress bar (Base UI). |
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
| children | React.ReactNode | - | Optional ProgressLabel and ProgressValue rendered above the track. |
ProgressLabel
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
| children | React.ReactNode | - | The label text for the progress bar. |
ProgressValue
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ((formattedValue: string | null, value: number | null) => React.ReactNode) | null | - | Optional render function for custom formatting (Base UI). Defaults to a percentage string. |
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
ProgressTrack
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
| children | React.ReactNode | - | Usually a ProgressIndicator. |
ProgressIndicator
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |