NumberTicker

NumberTicker is an animated number ticker component for React Native and React, from the dissolve library. Rolling digit columns for prices and counters, locale aware.

Animated number for prices, balances and counters. Every digit is a clipped 0 to 9 column that rolls to its new value on a calm iOS curve, right to left with a slight stagger. Added digits open in, removed ones fold out, so the layout never jumps.

Install

React Native

Install the engine once per app and wrap the root layout in <DissolveProvider> (see Installation), then copy the component into components/dissolve:

npx expo install dissolve-ui @shopify/react-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
npx dissolve-ui add number-ticker --native
npx shadcn@latest add https://dissolve.rselmi.com/r/native/number-ticker.json

React

Needs React 19 and react-dom, nothing else: no engine, no provider, no Tailwind. Works in the Next.js App Router.

npx dissolve-ui add number-ticker --web
npx shadcn@latest add https://dissolve.rselmi.com/r/number-ticker.json

Usage

NumberTicker.tsx (React Native)
import { NumberTicker } from '@/components/dissolve/number-ticker';

<NumberTicker
  value={balance}
  decimals={2}
  locale="fr-FR"
  suffix={'\u00A0€'}
  fontSize={44}
/>
NumberTicker.tsx (React)
import { NumberTicker } from '@/components/dissolve/number-ticker';

<NumberTicker
  value={balance}
  decimals={2}
  locale="fr-FR"
  suffix={'\u00A0€'}
  fontSize={44}
/>

Props

PropTypeDefaultDescription
valuenumberrequiredThe number to show. Digits roll whenever it changes.
decimalsnumber0Digits after the decimal separator.
localestringPicks the separators, e.g. 'fr-FR' gives "1 240,50", 'en-US' "1,240.50".
separatorstringOverrides the locale thousands separator. '' turns grouping off.
decimalSeparatorstringOverrides the locale decimal separator.
prefixstringStatic text before the number, e.g. '$'.
suffixstringStatic text after the number, e.g. a no break space and €.
fontSizenumber34Text size.
durationnumber700Roll duration, ms.
staggernumber28Delay between two columns, right to left, ms.
tabularbooleantrueTabular figures, so digits never change width.
classNamestring'flex-row items-center self-start'Root: margins, alignment.
textClassNamestring'font-semibold text-dissolve-foreground'Number: color, weight, family.
affixClassNamestringPrefix and suffix, added on top of the number classes.

Source

Previous: OTPInput · Next: ReactionPicker · All components

dissolve is MIT licensed. Source on GitHub, package on npm. This page as markdown. For AI agents: llms.txt.