Progress
Shows how much of a task is done: uploads, goals and multi-step flows. Use it when progress can be measured; use Spinner when it can't.
Ritla scan of this preview: 41 of 41 checks3 breakpointsScanned
Preview
Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.
Installation
Add the component
npx ritla add progressAlso works with shadcn:
npx shadcn@latest add @ritla/progressDependencies it brings
@base-ui/reactOr copy by hand
Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.
Usage
import { ProgressBar } from "@/components/ui/progress";<ProgressBar value={60} label="Uploading statement.pdf" />Examples
Sizes and indeterminate
sm, md and lg are 2, 4 and 8px tall; value={null} shows diagonal stripes when the amount isn't known.
Stepped
ProgressBarStepped with 3 to 8 steps: done, current and upcoming, read as “Step 3 of 8”.
Circle
ProgressCircle for upload rows and small spaces, 16, 20 or 24px, and it needs a label.
API reference
ProgressBar
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | None | Done from min to max; null is indeterminate. |
min / max | number | 0 / 100 | The range. |
label | ReactNode | None | What's progressing. |
showValue | boolean | true | Figma's Show text: the percentage at the inline end. |
size | "sm" | "md" | "lg" | "md" | Figma's Size. |
numerals / aria-label | … | None | Numeral system, and a name when there's no visible label. |
ProgressBarStepped
| Prop | Type | Default | Description |
|---|---|---|---|
steps | number | None | 3 to 8. |
current | number | None | Steps done; the next one is in progress. |
label / size | … | None | The label under the bar, and the size. |
inset | boolean | true | Keeps the segments 16px in from both edges, as in Figma; false runs them the full width. |
ProgressCircle
| Prop | Type | Default | Description |
|---|---|---|---|
value / min / max | number | None | As on the bar. |
label | string | None | Required: there's no visible text. |
size | 16 | 20 | 24 | 16 | The size. |
Accessibility
ARIA
role="progressbar"witharia-valuenow,aria-valuemin,aria-valuemaxand the value text, named by its label.- Don't show it for waits under a second, and don't let it go backwards.
Arabic and RTL notes
Mirrors
- The bar fills from the inline start: from the right in Arabic, and the steps too.
Does not mirror
- The circle runs clockwise from the top in both directions.
- Numerals
- The percentage follows
numeralsorRitlaProvider(٤٠٪). - Arabic typography
- The label is
label-14Medium, the stepped labellabel-16. - Mixed-direction text
- Put Latin file names in
<bdi>inside an Arabic label.
Checks it passes
The Ritla checks this component satisfies by construction. Used as documented, it does not bring these defects onto your page.
- Clipped text: content wider than its box with overflow hidden and no ellipsis
- Fixed-pixel-width container whose Arabic text exceeds the space
- Arabic text falling back past the declared font family (measured, declared, or a webfont that failed to load)
- letter-spacing applied to Arabic text (breaks the connected script)