Stats 20 - Period switcher with re-counting numbersPro

A stats row with a segmented period switcher above it; choosing a different period re-runs the counters from the previous value and updates each change label. Use it when visitors care about both recent and long-term performance.

About Stats 20

A stats row with a segmented period switcher above it; choosing a different period re-runs the counters from the previous value and updates each change label. Use it when visitors care about both recent and long-term performance.

Stats 20 is a pro stats block for React, built on shadcn/ui and Tailwind CSS. It ships as 118 lines of TypeScript you own: every piece of copy is a prop with a sensible default, so you can drop it in and replace the content without touching the layout.

  • toggle
  • period
  • segmented control
  • interactive
  • number ticker
  • comparison

Installation

  1. Add the Chocolate UI registry to your components.json (see the installation guide).
  2. Run the shadcn CLI:
npx shadcn@latest add @chocolate/stats-20

Dependencies installed automatically: lucide-react.

Uses: number-ticker, reveal, utils.

Usage

import Stats20 from "@/components/blocks/stats-20"

export default function Page() {
  return <Stats20 />
}

FAQ