Animated React charts and dashboard widgets

Goal gauge

A half-ring goal meter split by source. The arc sweeps up as the total counts in on odometer wheels; hover a segment to roll the center number to that part and name it.

Charts, in view, then hover, Motion

Install

npm i clsx motion tailwind-merge && curl -o components/goal-gauge.tsx https://motion-brew.com/r/goal-gauge.tsx

One self contained file for React and Tailwind CSS: goal-gauge.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { GoalGauge } from "@/components/goal-gauge";

export default function Page() {
  return (
    <GoalGauge
      title="Holiday fund"
      goal={1500}
      currency="EUR"
      locale="de-DE"
      segments={[
        { label: "Salary", value: 600 },
        { label: "Bonus", value: 250 },
        { label: "Gifts", value: 90 },
      ]}
      onAction={() => openReport()}
    />
  );
}

Pass `value` instead of `segments` for a single-color meter.

Props

PropTypeDefaultDescription
segmentsGaugeSegment[]five sources{ label, value, color? }; the total is their sum. Up to five colors, the rest fold into "Other"
valuenumberSingle amount, used when segments is not set
colorstring"#269a5a"Color for the single-amount arc
goalnumber1200Target amount
titleReactNode"Saving goal"Card title
subtitleReactNode"1 to 12 Apr, 2026"Line under the title
currencystring"USD"ISO currency code
localestring"en-US"Number formatting locale
durationnumber1.4Sweep length, seconds
actionLabelReactNode"View report"Header button; null hides it
onAction() => voidHeader button pressed

More charts

  • Month calendar: A month view where a soft disc follows your pointer, an ink disc springs to the picked day and months slide the way you travel.
  • Calendar agenda: A day planner: swipe an event left to mark it done and confetti rises out of the card, or right to delete it.
  • Mix chart: Stacked bars in vivid colours that grow in while the total counts up.
  • Activity grid: A year of daily activity as a heatmap that sweeps in while the totals count up.

All animated react charts and dashboard widgets