$npx @dinachi/cli@latest add progress-ring
24%
value24
64
100
undefined
sizeshowValuelabelupload.tsx
import { ProgressRing } from "@/components/ui/progress-ring"
export function Upload() {
return <ProgressRing value={24} label="Upload" />
}Usage
import { ProgressRing } from "@/components/ui/progress-ring"
export function Upload() {
return <ProgressRing value={64} label="Upload" />
}Examples
24%
Press the buttons quickly and watch the spring re-target.
import { ProgressRing } from '@/components/ui/progress-ring';
export function Example() {
return <ProgressRing value={64} label="Upload" />;
}Omit value when there is nothing honest to report.
// No value, so no number and no claim about how far along it is.
<ProgressRing label="Fetching" />68%
68%
68%
The stroke scales with the ring unless you pin it.
<ProgressRing value={68} size={128} label="Large" />
<ProgressRing value={68} label="Default" />
<ProgressRing value={68} size={56} label="Compact" />
<ProgressRing value={68} size={56} thickness={3} showValue={false} label="Hairline" />Notes
Motion tier
Needs motion. add --all skips it; install with add --motion or by name.
Value changes
The arc springs to each new value from wherever it is, so rapid updates merge into one sweep. The centre number follows the same spring, shared with number ticker.
Indeterminate
Omit value for an arc that lengthens and shortens while it rotates.
When to use it
- One operation being waited on, such as an upload, import or quota, or a compact spot with no room for a bar.
- For progress per row in a list, use Progress. The arc animates
stroke-dashoffset, which repaints. - Avoid it under about 40px, where the number stops fitting.
Agent
ProgressRing does not register with the agent bridge. The bridge reads it from the accessibility tree as progress with value, min and max, and no actions. While indeterminate it is a status and is not listed.
agent.snapshot()
// [{ component: "progress", label: "Upload", value: 64, min: 0, max: 100, actions: [] }]API
value
0 to 100. Omit it for the indeterminate arc.agent
numberlabel
The accessible name, also read by the agent.agent
string = "Progress" or "Loading"sizenumber = 96
Outer diameter, in pixels.thicknessnumber
Stroke width in pixels. Scales with size by default.showValueboolean = true
Shows the percentage. Ignored when indeterminate.Accessibility
- A determinate ring is a progressbar with
aria-valuenow,aria-valuemin,aria-valuemaxandaria-valuetext, such as "64 percent". - An indeterminate ring is a status with no value.
labelis the accessible name; defaults to "Progress" or "Loading".- The centre number is aria-hidden; the ring announces the value.
- Reduced motion jumps to the value and shows a static gap instead of the sweep.