Number Roll

An odometer style animated number where each digit rolls on a spring and only changed digits move. Supports Intl formatting, trend tint and reduced motion.

src/registry/ui/number-roll.tsx/r/number-roll.json

Installation#

bash
npx shadcn@latest add https://ui.minidev.pro/r/number-roll.json

Usage#

tsx
import { NumberRoll } from "@/components/ui/number-roll"

export function Example() {
  return <NumberRoll />
}

API reference#

NumberRoll props
PropTypeDefault
valuenumber1284
formatIntl.NumberFormatOptions-
localestring"en-US"
trendboolean-
classNamestring-

Dependencies#

npm

motion

Built from

No other MiniDev files
All Animated React components