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-3d-flip-numbers

v1.0.0

Published

The `react-3d-flip-numbers` package is a React component for creating animated 3D flipping numbers. It provides a visually appealing way to display changing numeric values with smooth transitions and customizable styles.

Readme

React 3D Flip Numbers

The react-3d-flip-numbers package is a React component for creating animated 3D flipping numbers. It provides a visually appealing way to display changing numeric values with smooth transitions and customizable styles.

| Version | Compatibility | |------------|---------------| | 1.x | React 18.2+ |

Dependencies

This package uses the following libraries as dependencies:

"react": "^18.2.0"

Table of Contents


Installation

npm install react-3d-flip-numbers

Exports

The primary export is <FlipNumbers>.

// Import the FlipNumbers component
import { FlipNumbers } from 'react-3d-flip-numbers';

Usage

Here's a basic example of how to use the component:

import React, { useState } from 'react';
import { FlipNumbers } from 'react-3d-flip-numbers';

const App = () => {
  const [value, setValue] = useState(123);

  return (
    <div>
      <FlipNumbers
        value={value}
        formatter={(number) => number.toLocaleString()} // Format the number
        wrapperClassName="custom-wrapper"               // Optional: CSS class for the wrapper
        numberClassName="custom-number"                 // Optional: CSS class for each number
        height={30}                                     // Height of each number block
        duration={0.5}                                  // Animation duration in seconds
        delay={0.1}                                     // Animation delay in seconds
        hasShadow={true}                                // Optional: Adds shadow for enhanced 3D effect  
      />  
      />
      <button onClick={() => setValue((prev) => prev + 1)}>Increment</button>
    </div>
  );
};

Configuration Options

The <FlipNumbers> component accepts the following props:

| Prop | Type | Default | Description | |--------------------|--------------------------|----------------|-----------------------------------------------| | value | number or string | Required | The value to display. | | formatter | (number) => string | (n) => n.toString() | Function to format the number. | | wrapperClassName | string | '' | Optional CSS class for the container. | | numberClassName | string | '' | Optional CSS class for individual numbers. | | height | number | 50 | Height of each number block in pixels. | | duration | number | 0.3 | Animation duration in seconds. | | delay | number | 0 | Animation delay in seconds. | | hasShadow | boolean | false | Adds shadow for a more pronounced 3D effect. |


Styling

You can customize the appearance of the component using CSS. The following class names are used:

  • .flip-numbers - Wrapper for the entire number sequence, centers content horizontally and vertically.
  • .invisible - Hides elements visually while keeping them in the DOM.
  • .flip-number-container - Container for each number, manages overflow and stacking with z-index.
  • .flip-number - Represents each number as an independent 3D element, enabling flipping animations.
  • .flip-number div - Ensures smooth font rendering and proper 3D effects with backface-visibility.
  • .flip-number-fake - Adds a semi-transparent, smaller "fake" number used for flipping transitions.
  • .flip-number-active - Highlights the active number prominently during the animation.
  • .flip-shadow - Adds shadow effects for enhanced 3D visuals (applied when hasShadow is true).

You can modify these styles in your CSS to align the component’s design with your application.


Scripts

The following scripts are available:

npm test

Runs the test suite in watch mode.

npm run build

Builds the package and outputs the distributable files in the dist directory.


License

This project is licensed under the MIT License.