Number ticker
An odometer-style number that rolls each digit to the next value.
PaletteCalamansi
12,847
Kalansing
Installation
npx shadcn@latest add fujiDevv/calamansi-ui/number-tickerHow to use
demo.tsx
import { NumberTicker } from "@/components/ui/number-ticker"export function Demo() {return <NumberTicker value={12847} className="text-4xl font-semibold" />}
Props
Options you can pass to customize this component.
value*requirednumberThe number to show.
variantoptionalwhitecalamansislatecitrusSurface palette. Calamansi is the default slab; White is white in light mode and near-black in dark.
durationoptionalnumberSeconds for each digit to settle.
staggeroptionalnumberDelay between digits, in seconds.
directionoptionalupdownRoll the digits upward or downward.
prefixoptionalstringStatic text before the digits, such as a currency symbol.
suffixoptionalstringStatic text after the digits.
formatoptional(value: number) => stringTurns the number into text before the digits are split.
classNameoptionalstringExtra classes merged onto the ticker.
Dependencies
motion
License & Usage
- •Free to use and modify in personal and commercial projects.
- •Attribution to Calamansi UI is appreciated when using a component.
- •Please do not resell the components as your own kit.