Skip to content
Feedback & Data

CounterFlow

An odometer. Each digit is a strip of 0 to 9 that rolls into place the first time the number scrolls into view. Change the value later and only the digits that differ roll.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
valuenumberโ€”Final number.
prefixstringโ€”Text before the number, like "$".
suffixstringโ€”Text after the number, like "%" or "+".
decimalsnumber0Digits after the point.
localestring"en-US"Number format, like "en-IN" for lakh commas.
durationnumber1.4Seconds each digit rolls.
classNamestring"text-4xl font-semibold text-white"Text size and colour.