react-number-format-with-commas
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

React Number Formatted with Commas

It's just an input form with commas that returns the number (as a string sans commas) to the supplied onChange handler.

Installation

yarn add react-number-format-with-commas

or

npm install react-number-format-with-commas

Usage

import { InputNumberCommas } from 'react-number-format-with-commas';

const onChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(
  (e) => setValue(e.target.value), // e.target.value is a string sans commas here
  [setValue]
);

<InputNumberCommas onChange={onChange} />;

Dependencies (0)

    Dev Dependencies (23)

    Package Sidebar

    Install

    npm i react-number-format-with-commas

    Weekly Downloads

    112

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    31 kB

    Total Files

    17

    Last publish

    Collaborators

    • aryanjabbari