Stop Rebuilding UI

Stats Comparison With Sparklines

A period comparison stats card for React and Next.js with two side-by-side columns, each showing a NumberFlow animated value and a 48px ChartContainer sparkline, separated by a vertical divider and a delta callout built with shadcn/ui and Tailwind CSS

Scroll to load preview

Compare this-period versus last-period performance with this dual-sparkline comparison stats card for React and Next.js. Features a grid-cols-2 body with a vertical divide-x separator, NumberFlow animated current and previous values wrapped in min-w containers, two independent ChartContainer sparklines at h-12 with trend-keyed stroke colours, a bottom delta callout row with a TrendingUp icon, and a motion/react parent entrance. Built with TypeScript, ChartContainer from shadcn/ui, Recharts AreaChart sparklines, NumberFlow, motion/react, Lucide React icons, and Tailwind CSS. Perfect for SaaS MRR comparisons, marketing channel A/B tests, ops error-rate period toggles, and finance month-over-month dashboards.

FAQ

Last updated on April 12, 2026

Was this page helpful?

Sign in to leave feedback.