Components
Progress
A linear progress bar to indicate task completion with optional percentage label. Supports custom styling through className and accessible attributes.
50%
Installation
Usage
import { Progress } from "@/registry/core/progress";
export default () => <Progress progress={50} withLabel />;Examples
Basic Progress
<Progress progress={30} />Progress with Label
<Progress progress={75} withLabel />API Reference
Progress
Extends div element props.
| Prop | Type | Default | Description |
|---|---|---|---|
progress | number | - | Completion percentage (0–100) |
withLabel | boolean | false | Show percentage label next to the bar |
className | string | - | Custom classes for container styling |
Accessibility
- Uses
role="progressbar"witharia-valuenow,aria-valuemin,aria-valuemax, andaria-valuetext. - Fully keyboard and screen-reader accessible.
Notes
- The bar smoothly fills based on the
progressprop. - Works well inside flex layouts.
- Label is optional and aligns next to the progress bar.
- Rounded corners and overflow handling are applied for cross-browser compatibility.