Activity Rings

Concentric activity rings lap their goal while three metrics count up beside them. A free, MIT-licensed Remotion number animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/activity-rings

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { ActivityRings } from "@/components/remocn/activity-rings";
 
const ActivityRingsScene = () => (
  <ActivityRings
    title="This quarter"
    rings={[
      { label: "Renders", value: 2400, goal: 1.2 },
      { label: "Templates", value: 64, goal: 1.1 },
      { label: "Hours saved", value: 420, unit: "h", goal: 1.05 },
    ]}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="ActivityRings"
    component={ActivityRingsScene}
    durationInFrames={130}
    fps={30}
    width={1280}
    height={720}
  />
);

Three concentric rings fill clockwise one after another, snap closed, then lap past their goal with a check mark while the labels count up beside them. Pass rings (label, value, optional unit, and a goal fraction such as 1.14) and a title. Ships dark and light via theme.

Props13

PropTypeDefault
rings
ActivityRing[]DEFAULT_RINGS

Up to three rings, outermost first.

title
string"This month"

Small heading above the readouts.

goalLabel
string"of goal"

Text after the over-goal percentage on each readout.

fill
number42

Frames the outer ring takes to close; inner rings follow 4 frames apart.

accent
string"#3B5BFD"

Color of the outer hero ring.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Sora"

Typeface for the copy. Load the font in your project first.

grain
booleantrue

Film grain over the scene.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback multiplier.

theme
"dark" | "light""dark"

Dark or light palette.

  • ringsActivityRing[]

    Up to three rings, outermost first.

    DefaultDEFAULT_RINGS

  • titlestring

    Small heading above the readouts.

    Default"This month"

  • goalLabelstring

    Text after the over-goal percentage on each readout.

    Default"of goal"

  • fillnumber

    Frames the outer ring takes to close; inner rings follow 4 frames apart.

    Default42

  • accentstring

    Color of the outer hero ring.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Sora"

  • grainboolean

    Film grain over the scene.

    Defaulttrue

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback multiplier.

    Default1

  • theme"dark" | "light"

    Dark or light palette.

    Default"dark"