s-yadav/react-number-format
s-yadav/react-number-format has 4,099 GitHub stars and 417 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 15:34 UTC. Last push 2026-03-22.
React component to format numbers in an input or as a text.
What you can do
- Prefix, suffix and thousands separator.
- Format number in an input or format as a simple text.
- Custom pattern formatting.
- Custom formatting handler.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalreact-number-format
React Number Format is an input-formatter library with a sophisticated and light weight caret engine. It ensures that a user can only enter text that meets specific numeric or string patterns, and formats the input value for display.
Features
- Prefix, suffix and thousands separator.
- Input Masking.
- Format number in an input or format as a simple text.
- Custom pattern formatting.
- Custom formatting handler.
- Fully customizable
Demos
See the many DEMO sections in the documentation.
Install
Using npm
npm install react-number-format
Using yarn
yarn add react-number-format
Documentation
Read the full documentation here https://s-yadav.github.io/react-number-format/docs/intro
ES6
Numeric Format
import { NumericFormat } from 'react-number-format';
NumericFormat Props: https://s-yadav.github.io/react-number-format/docs/numeric_format
Pattern Format
import { PatternFormat } from 'react-number-format';
PatternFormat Props: https://s-yadav.github.io/react-number-format/docs/pattern_format
Migrate from v4 to v5
https://s-yadav.github.io/react-number-format/docs/migration
v4 doc
Development
- Clone the repository or download the zip
npm i -g yarnto download Yarnyarnto install dependenciesyarn startto run example server (http://localhost:8084/)yarn testto test changesyarn buildto bundle files
Testing
Test cases are written in jasmine and run by karma
Test files : /test/**/*.spec.js
To run test : yarn test
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,757 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,341 starsreact/react
The library for web and native user interfaces.
252,413 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,631 stars