Animated React charts and dashboard widgets

Spending meter

A spending card whose pills fill in turn as the amount counts up on odometer wheels. Hover a pill to roll the number to what was spent in that slice. Drag Spent to watch it count.

Charts, in view, then hover, Motion

Install

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

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

Usage

import { SpendingMeter } from "@/components/spending-meter";

export default function Page() {
  return <SpendingMeter value={412.5} limit={1500} pills={8} currency="EUR" onAction={() => openReport()} />;
}

Props

PropTypeDefaultDescription
valuenumber1010Amount spent; changes count from the old value
limitnumber1800Spending limit
pillsnumber6Pills in the bar
colorstring"#ff8f0f"Fill color; the empty pills stay light gray
titleReactNode"Spending limit"Card title
subtitleReactNode"1 to 12 Apr, 2026"Line under the title
currencystring"USD"ISO currency code
localestring"en-US"Number formatting locale
durationnumber1.4Fill length, seconds
actionLabelReactNode"View report"Header button; null hides it
onAction() => voidHeader button pressed

More charts

  • Goal gauge: A half-ring goal meter split by source.
  • 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.

All animated react charts and dashboard widgets