React component to format numbers in an input or as a text.
JavaScript
4,098
578 commits
updated Mar 22, 2026
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.
See the many DEMO sections in the documentation.
Using npm
npm install react-number-format
Using yarn
yarn add react-number-format
Read the full documentation here https://s-yadav.github.io/react-number-format/docs/intro
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
https://s-yadav.github.io/react-number-format/docs/migration
npm i -g yarn to download Yarnyarn to install dependenciesyarn start to run example server (http://localhost:8084/)yarn test to test changesyarn build to bundle filesTest cases are written in jasmine and run by karma
Test files : /test/**/*.spec.js
To run test : yarn test
Overall
Maintained
Code review
Latest release
Releases this year
1,666 followers · starred Mar 2017
34 followers · starred Apr 2023
125 followers · starred Feb 2019
196 followers · starred Oct 2017
React component to format numbers in an input or as a text.
JavaScript
4,098
578 commits
updated Mar 22, 2026
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.
See the many DEMO sections in the documentation.
Using npm
npm install react-number-format
Using yarn
yarn add react-number-format
Read the full documentation here https://s-yadav.github.io/react-number-format/docs/intro
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
https://s-yadav.github.io/react-number-format/docs/migration
npm i -g yarn to download Yarnyarn to install dependenciesyarn start to run example server (http://localhost:8084/)yarn test to test changesyarn build to bundle filesTest cases are written in jasmine and run by karma
Test files : /test/**/*.spec.js
To run test : yarn test
Overall
Maintained
Code review
Latest release
Releases this year
1,666 followers · starred Mar 2017
34 followers · starred Apr 2023
125 followers · starred Feb 2019
196 followers · starred Oct 2017