213
Digits that turn like a real counter: every place rolls the way the number moved, so 9 ticks over to 0 instead of spinning back, and it counts up the first time you scroll to it.
akanumber ticker·counter
Run this in any project set up for the shadcn CLI. It copies the Odometer source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/odometer.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { Odometer } from "@/components/odometer";
export default function Page() {
return <Odometer />;
}A free React motion component in the Text collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Odometer source. Everything is optional unless it says required. It also accepts Omit<ComponentProps<"span">, "children">.
| Prop | Type | Default |
|---|---|---|
| valuerequired | number | — |
| from | number | 0 |
| format | Intl.NumberFormatOptions | — |
| locale | string | "en-US" |
| startOnView | boolean | true |
| stiffness | number | 170 |
| stagger | number | 0.035 |