2.0.0 • Published 5 months ago
number-format-react v2.0.0
NumberFormat
number-format-react
is a React component implementation of the
Intl.NumberFormat
global object.
Install
npm install number-format-react
oryarn add number-format-react
Use
import NumberFormat from 'number-format-react';
function MyComponent() {
return (
<p>
My favorite number is
<NumberFormat>3141.58</NumberFormat>!
</p>
);
}
Props
The NumberFormat
component supports the entire Intl.NumberFormat
API via
its props, with strong type-checking. For a full catalog of the
Intl.NumberFormat
API, check out
MDN's documentation.