Files
CRAPP/src/components/motion/Numero.tsx
T

21 lines
373 B
TypeScript
Raw Normal View History

2026-08-06 08:36:47 +02:00
import { useConteggio } from "@/lib/motion";
/** Contatore animato per statistiche e percentuali. */
export function Numero({
valore,
durata = 700,
suffisso = "",
}: {
valore: number;
durata?: number;
suffisso?: string;
}) {
const n = useConteggio(valore, durata);
return (
<span className="tabular-nums">
{n}
{suffisso}
</span>
);
}