Number ticker preview

Number ticker

Odometer-style numbers – every digit rolls to its new value and counts in from zero when it scrolls into view

  • Group
    Numbers
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/number-ticker

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { NumberTicker } from "@/registry/components/number-ticker/number-ticker";

<NumberTicker value={0} />

Props

NameTypeDefaultDescription
valuenumberThe number to show – change it and the digits roll to the new value
formatIntl.NumberFormatOptionsFormatting, e.g. currency, percent, compact notation or fraction digits
localestringbrowser localeLocale passed to Intl.NumberFormat, e.g. "en-US" or "de-DE"
durationnumber900Length of a roll in milliseconds
delaynumber0Wait before the first count-in, in milliseconds
classNamestringExtra class on the wrapper – font size, weight and color are inherited

When to use

- KPIs, prices and counters that change while the user is looking, like dashboards or live stats - Headline numbers on a landing page that should count in when they scroll into view

When not to use

Numbers that change many times a second.

Related

Change summary · Text reveal