
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
react-number-format
Advanced tools
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
Cleave.js is a library that can format input text content when you are typing. It provides similar functionalities to react-number-format, such as number formatting, credit card formatting, phone number formatting, and date formatting. It differs in that it is not React-specific and can be used with plain JavaScript or other frameworks.
Numeral is a library for formatting and manipulating numbers. It's similar to react-number-format in that it can format numbers as currency, percentages, and other formats. However, it is not a React component and does not handle input fields directly. It is more focused on number manipulation and formatting in general JavaScript applications.
Currency.js is a small and lightweight library for working with currency values. It allows you to perform arithmetic operations and formatting on currency numbers. While it provides similar currency formatting capabilities, it does not come as a React component and is more suited for general arithmetic and formatting operations rather than handling user input.
FAQs
React component to format number in an input or as a text.
The npm package react-number-format receives a total of 2,549,961 weekly downloads. As such, react-number-format popularity was classified as popular.
We found that react-number-format demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.