Counting number

Big numbers count up to their value and ease out softly.

UniversalUsed in production
Install
npx finepieces add counting-number
Or with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/counting-number.json

import { CountingNumber } from "@/components/fine-pieces/counting-number";

export default function Example() {
  return (
    <div className="grid h-full min-h-[360px] content-center gap-6 p-10 sm:grid-cols-3">
      {[[12, "years of practice"], [340, "homes designed"], [9, "people in the studio"]].map(([n, t]) => (
        <div key={t} className="border-t border-foreground/25 pt-4">
          <CountingNumber value={n as number} className="block font-display text-[clamp(72px,9vw,140px)] font-medium leading-[.9] tracking-[-.03em]" />
          <p className="mt-2 text-muted-foreground">{t}</p>
        </div>
      ))}
    </div>
  );
}