npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-number-flow

v0.1.0

Published

A per-digit animated number ticker for React Native. Only the digits that change roll, up for increases and down for decreases, with locale-free formatting.

Readme

react-native-number-flow

A per-digit animated number ticker for React Native - only the digits that change move, and they roll up when the value increases, down when it decreases. Pure TypeScript, built on the Animated API, with no native modules to link.

License

iOS demo

Features

  • Per-digit roll: only the characters that actually changed move.
  • Direction-aware: digits roll up on increase, down on decrease.
  • Locale-free thousands grouping and fixed decimal places out of the box.
  • Bring-your-own format for currency, percentages, units, prefixes or suffixes.
  • Configurable duration and easing; standard text style and color.
  • Pure TypeScript, no native modules, no Reanimated. translateY runs on the native driver.
  • Right-aligned slots: a growing number inserts a new leading character instead of re-rolling the existing leading digit.

Installation

npm install react-native-number-flow

This library has no runtime dependencies beyond its peers:

npm install react react-native

Usage

import { NumberFlow, thousandsLong } from 'react-native-number-flow';

<NumberFlow value={score} format={thousandsLong()} />;

Every value change animates only the digits that actually changed.

Price with two decimal places

import { NumberFlow, thousands } from 'react-native-number-flow';

<NumberFlow
  value={price}
  format={thousands({ decimalPlaces: 2 })}
  textStyle={{ fontSize: 34, fontWeight: '600' }}
/>;

Custom format

<NumberFlow value={balance} format={(v) => `$${thousands({ decimalPlaces: 2 })(v)}`} />

Custom animation

import { Easing } from 'react-native';

<NumberFlow value={score} duration={600} easing={Easing.out(Easing.cubic)} />

Steady columns with tabular figures

Each character sizes itself to the digit it shows. With a proportional font a 1 is narrower than an 8, so the row can shift sideways as digits change. Add fontVariant: ['tabular-nums'] to the text style to give every figure the same width, which keeps the columns from moving while they roll:

<NumberFlow value={score} textStyle={{ fontSize: 48, fontVariant: ['tabular-nums'] }} />

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | number | required | The numeric value to display. | | format | (value: number) => string | plainDouble | Turns the value into the displayed string. | | textStyle | StyleProp<TextStyle> | - | Style applied to every character. | | color | string | - | Overrides the text color. | | duration | number | 450 | Roll duration in milliseconds. | | easing | EasingFunction | Easing.inOut(Easing.ease) | Roll easing. |

Formatting helpers

thousands(options), thousandsLong(grouping), plainDouble, plainLong, and the pure formatWithThousands(value, options) / groupThousands(digits, grouping) are all exported, so you can reuse them without the component.

A note on growing numbers

Slots are keyed by their distance from the right edge of the string. When a number grows (for example 99 to 100), the existing trailing digits stay put and a fresh leading character rolls in on the left, rather than the leading digit visibly changing. This differs intentionally from a strict left-index ticker.

Other platforms

The same number ticker is available for other platforms:

License

Licensed under the Apache License, Version 2.0. See LICENSE.