Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Number Ticker

Pro

Counts to a value with a spring when it scrolls into view, with locale formatting.

Installation

pnpm dlx shadcn@latest add @viewport/number-ticker

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
value*number

Final value.

—
fromnumber

Value to start counting from.

0
decimalsnumber

Digits after the decimal point.

0
delaynumber

Seconds to wait after entering the viewport.

0
prefixstring""
suffixstring""
localestring

BCP 47 locale used for grouping separators.

"en-US"
classNamestring—

Accessibility

  • Screen readers get the final value once, not every frame.
  • Uses tabular numerals so the layout never shifts.
  • Jumps straight to the value under reduced motion.