Skip to content

Progress

Get Ritla UI

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

Open in Figma

Preview

Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.

PreviewCode
EnglishMirroredArabic
LTR →

Installation

  1. Add the component

    npx ritla add progress

    Also works with shadcn: npx shadcn@latest add @ritla/progress

  2. Dependencies it brings

    @base-ui/react

  3. Or 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

progress.tsx
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.

EnglishMirroredArabic
LTR →

Stepped

ProgressBarStepped with 3 to 8 steps: done, current and upcoming, read as “Step 3 of 8”.

EnglishMirroredArabic
LTR →

Circle

ProgressCircle for upload rows and small spaces, 16, 20 or 24px, and it needs a label.

EnglishMirroredArabic
LTR →

API reference

ProgressBar

PropTypeDefaultDescription
valuenumber | nullNoneDone from min to max; null is indeterminate.
min / maxnumber0 / 100The range.
labelReactNodeNoneWhat's progressing.
showValuebooleantrueFigma's Show text: the percentage at the inline end.
size"sm" | "md" | "lg""md"Figma's Size.
numerals / aria-label…NoneNumeral system, and a name when there's no visible label.

ProgressBarStepped

PropTypeDefaultDescription
stepsnumberNone3 to 8.
currentnumberNoneSteps done; the next one is in progress.
label / size…NoneThe label under the bar, and the size.
insetbooleantrueKeeps the segments 16px in from both edges, as in Figma; false runs them the full width.

ProgressCircle

PropTypeDefaultDescription
value / min / maxnumberNoneAs on the bar.
labelstringNoneRequired: there's no visible text.
size16 | 20 | 2416The size.

Accessibility

ARIA

  • role="progressbar" with aria-valuenow, aria-valuemin, aria-valuemax and 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 numerals or RitlaProvider (٤٠٪).
Arabic typography
The label is label-14 Medium, the stepped label label-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.

  • R042Clipped text: content wider than its box with overflow hidden and no ellipsis
  • R043Fixed-pixel-width container whose Arabic text exceeds the space
  • R050Arabic text falling back past the declared font family (measured, declared, or a webfont that failed to load)
  • R051letter-spacing applied to Arabic text (breaks the connected script)