Modus UI

Progress Ring

Web (React)

A circular ring that smoothly sweeps to a value, with a live numeric readout.

A highly precise, animated progress ring. It animates both the SVG pathLength and the numeric label smoothly using Framer Motion, avoiding the standard dash-array visual glitches on large stroke widths.

Installation

CLI

npx @modus-ui/cli add progress-ring

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/progress-ring.tsx.
  3. Paste the code.

Usage

tsx
import { ProgressRing } from "@/components/ui/progress-ring";

export default function Example() {
  return <ProgressRing value={75} size={120} strokeWidth={8} showLabel={true} />;
}

Props

PropTypeDefaultDescription
valuenumber72How far round to sweep, 0 to 100.
sizenumber120Outer diameter, in pixels.
strokeWidthnumber10Thickness of the ring, in pixels.
durationnumber1.2Seconds the sweep takes.
showLabelbooleantruePrint the percentage in the middle.
classNamestring""-

Comments

  • No comments yet.