On this page

InstallationA value out of a totalPartsSizesAccessibilityAPI ReferenceRulesWritten down

Progress ring

The Progress bar drawn round: one value out of a total, on a tint of its own color; or two or three parts that fill the circle.

x
1<ProgressRing aria-label="Probes graded" value={62} max={100} />

Installation

import { ProgressRing } from "@catalog-dashboard/components";

A value out of a total

One value out of max: an arc with round ends, from the top and clockwise, on a track of its own color at 35%.

x
x
1<ProgressRing aria-label="Tokens used" value={120} max={250} color="info" />2<ProgressRing aria-label="Tokens used" value={250} max={250} color="error" />

Parts

Two or three parts, clockwise from the top in order, in success, error or info. They always fill the whole circle, 1px apart, with no track, so the ring stays unnamed: its numbers go beside it.

x
x
1<ProgressRing parts={[{ value: 4, color: "success" }, { value: 1, color: "error" }]} />2<ProgressRing parts={[{ value: 48, color: "info" }, { value: 30, color: "success" }, { value: 22, color: "error" }]} />

Sizes

sm 12px with a 3px stroke, md 16px with 3.5px, lg 20px with 4px.

x
x
x
1<ProgressRing aria-label="Progress" size="sm" value={62} max={100} />2<ProgressRing aria-label="Progress" size="md" value={62} max={100} />3<ProgressRing aria-label="Progress" size="lg" value={62} max={100} />

Accessibility

Named with aria-label, it is a progressbar: a screen reader hears its name and how far along it is. Unnamed, it is decoration (aria-hidden), for numbers beside it that say the same. Parts always fill the ring, so a screen reader would only hear 100%: leave a ring of parts unnamed, with its numbers beside it.

API Reference

Besides these, the props of Base UI's Progress.Root.

PropTypeDefaultDescription
valuenumber—One value, over a track of its color.
color"neutral" | "primary" | "success" | "warning" | "error" | "info" | "fuchsia""info"The value's color, and its track's at 35%.
maxnumber—What the value is out of. By default the value itself, so it fills the ring.
parts[part, part] | [part, part, part], each { value: number; color?: "success" | "error" | "info" }—Two or three parts in place of a value; they always fill the ring.
size"sm" | "md" | "lg""md"12px with a 3px stroke, 16px with 3.5px, or 20px with 4px.

Rules

Written down

The Progress bar's sibling

Its props, colors and arithmetic are the Progress bar's; only the drawing is round.

From ds/README.md (Progress ring).

Parts fill the ring

Two or three parts always make the whole circle, 1px apart: no track, no max.

From ds/README.md (Progress ring) and ds/components/progress-ring.tsx.

No pie yet

A pie is not built: it waits for a screen that needs one.

From ds/README.md (Progress ring).

Catalog
Foundations
  • Overview
  • Tokens
  • Token usage
  • Typography
  • Icons
Atoms
  • Avatar
  • Badge
  • Button
  • Checkbox
  • Color picker
  • Copy button
  • Icon tooltip
  • Inline code
  • Input
  • Hint
  • Kbd
  • Loader
  • Native select
  • Progress bar
  • Progress ring
  • Radio
  • Select
  • Status dot
  • Switch
  • Text link
  • Textarea
  • Tooltip
  • Truncate
Molecules
  • Accordion
  • Activity chart
  • AI elements
  • Alert
  • Button group
  • Card
  • Code block
  • Combobox trigger
  • Command
  • Context switcher
  • Dropdown menu
  • Empty state
  • Field
  • Field group
  • Filter chip
  • Flow
  • Icon picker
  • Metric card
  • Modal
  • Modal confirmation
  • Pagination
  • Popover
  • Scroll area
  • Sidebar
  • Table
  • Tabs
  • Toggle group
LibraryPublished release