Progress
Progress indicators show the completion status of a task or operation. This package includes two variants: a linear progress bar and a circular progress indicator.
Linear Progress Bar
Basic Usage
import { ProgressBar } from '@/components'
<ProgressBar value={60} />Counter Position: Right
Display a percentage counter to the right of the progress bar.
60%
<ProgressBar value={60} counter="right" />Counter Position: Below
Display a percentage counter below the progress bar.
60%
<ProgressBar value={60} counter="below" />Controlled
Control the progress value externally.
30%
const [value, setValue] = useState(30)
<ProgressBar value={value} counter="right" />All Variants
0%
0%
0%
10%
10%
10%
20%
20%
20%
30%
30%
30%
40%
40%
40%
50%
50%
50%
60%
60%
60%
70%
70%
70%
80%
80%
80%
90%
90%
90%
100%
100%
100%
Circular Progress
Basic Usage
import { CircularProgress } from '@/components'
<CircularProgress value={60} />60%
Custom Sizes
Customize the size and stroke width of the circular progress.
60%
60%
60%
<CircularProgress value={60} size={80} strokeWidth={6} />
<CircularProgress value={60} size={120} strokeWidth={8} />
<CircularProgress value={60} size={150} strokeWidth={8} />Without Label
Hide the center percentage label.
<CircularProgress value={75} showLabel={false} />Controlled
Control the progress value externally.
30%
const [value, setValue] = useState(30)
<CircularProgress value={value} />All Variants
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Accessibility
ProgressBar
- Built on Radix UI Progress primitive for robust accessibility
- Proper ARIA attributes (
role="progressbar",aria-valuenow,aria-valuemin,aria-valuemax) - Screen reader friendly progress announcements
CircularProgress
- Uses
role="progressbar"with proper ARIA attributes - SVG is marked as decorative (
aria-hidden="true") since the parent provides accessibility - Label is visible and readable by screen readers
API Reference
ProgressBar Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | - | Current progress value (0-100) |
| max | number | 100 | Maximum value |
| counter | 'none' | 'right' | 'below' | 'none' | Position of the percentage counter |
| className | string | - | Additional CSS classes |
CircularProgress Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | - | Current progress value (0-100) |
| max | number | 100 | Maximum value |
| size | number | 150 | Size of the circle in pixels |
| strokeWidth | number | 8 | Width of the progress stroke |
| showLabel | boolean | true | Show percentage label in center |
| className | string | - | Additional CSS classes |