Stop Rebuilding UI

Stats Donut With Center Total

A segment breakdown donut stats card for React and Next.js with an absolute-positioned NumberFlow center total, ChartContainer-wrapped Recharts PieChart, per-segment var(--chart-N) tokens, and a pill legend below built with shadcn/ui and Tailwind CSS

Scroll to load preview

Break down spend by channel with this donut stats card for React and Next.js. Features a ChartContainer-wrapped Recharts PieChart at aspect-square with innerRadius 62 and outerRadius 92, an absolute-positioned NumberFlow center total in USD with layout-stable min-width, per-segment var(--chart-1..4) tokens wired through ChartConfig, and a four-row legend pill list below showing color dot, label, percentage, and absolute value. Built with TypeScript, ChartContainer from shadcn/ui, Recharts PieChart, NumberFlow from @number-flow/react, motion/react parent entrance, and Tailwind CSS. Perfect for marketing budget allocations, traffic source breakdowns, payment method distributions, and infrastructure cost reports.

FAQ

Last updated on April 12, 2026

Was this page helpful?

Sign in to leave feedback.