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

@quanna/react-native-animated-number

v0.1.0

Published

A React Native component for displaying animated numbers, written in SwiftUI for seamless and super-smooth animations when changing numeric values.

Readme

@quanna/react-native-animated-number

A React Native component for displaying animated numbers, written in SwiftUI for seamless and super-smooth animations when changing numeric values.

Animations

The animations are handled natively using SwiftUI, ensuring smooth transitions when changing numbers. Animations are built into the number transitions, requiring no additional setup.


Features

  • Super smooth animations for changing numbers.
  • Support for integers and decimal numbers.
  • Display units such as %, kg, or any custom label.
  • Fully customizable styles for numbers and units.
  • Easy integration with React Native projects.

Installation

You can install the package using either Bun or Yarn:

Using Bun

bun add @quanna/react-native-animated-number

Using Yarn

yarn add @quanna/react-native-animated-number

Usage

Here's an example of how to use @quanna/react-native-animated-number in your React Native project:

Example

import React, { useState } from 'react';
import { View, Button, StyleSheet } from 'react-native';
import ReactNativeAnimatedNumberView from '@quanna/react-native-animated-number';

export default function App() {
  const [number, setNumber] = useState(42.5);
  const [displayDecimal, setDisplayDecimal] = useState(false);

  return (
    <View style={styles.container}>
      <ReactNativeAnimatedNumberView
        number={number}
        unit="%"
        displayDecimal={displayDecimal} // Toggle decimals (true or false)
        style={styles.animatedNumberContainer}
        numberStyle={styles.numberText}
        unitStyle={styles.unitText}
      />
      <View style={{ marginVertical: 10 }} />
      <Button
        title="Change Number"
        onPress={() => setNumber(Math.random() * 100)} // Update number dynamically
      />
      <Button
        title={displayDecimal ? 'Show Integers' : 'Show Decimals'}
        onPress={() => setDisplayDecimal(!displayDecimal)} // Toggle decimals
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#f7f7f7',
  },
  animatedNumberContainer: {
    backgroundColor: 'green',
    padding: 10,
    borderRadius: 8,
  },
  numberText: {
    fontSize: 24,
    fontWeight: 'bold',
    color: 'white',
  },
  unitText: {
    fontSize: 16,
    color: 'yellow',
  },
});

Properties

| Prop | Type | Default | Description | | ----------------- | --------------------------- | ------- | --------------------------------------------------------------------------- | | number | number | 0 | The numeric value to be displayed. Can be positive or negative. | | displayDecimal | boolean | false | Whether to display the number with decimals. | | unit | string | "" | Unit to display next to the number (e.g., %, kg, lbs). | | style | StyleProp<ViewStyle> | null | Custom styles for the container wrapping the number and unit. | | numberStyle | StyleProp<TextStyle> | null | Custom styles for the number text. | | unitStyle | StyleProp<TextStyle> | null | Custom styles for the unit text. |


Customization

You can style the component to match your design using the following props:

Outer Container Styles

Use the style prop to customize the container view:

<ReactNativeAnimatedNumberView
  style={{
    backgroundColor: 'black',
    borderRadius: 10,
    padding: 10,
  }}
/>

Number and Unit Styles

Use numberStyle and unitStyle props to style the number and unit text:

<ReactNativeAnimatedNumberView
  numberStyle={{
    fontSize: 30,
    fontWeight: 'bold',
    color: 'white',
  }}
  unitStyle={{
    fontSize: 18,
    color: 'gray',
  }}
/>

License

This library is licensed under the MIT License. Feel free to use it in your projects.


Happy coding! 🚀