<p align="center"> <a href='https://yaireo.github.io/react-number-input/'> <img src="./demo.gif?sanitize=true" alt="converts input type number to locale string and back"/> </a> <p>
npm install @yaireo/react-number-input
to a nicely-printed locale-based string when the input field
number so it could be edited easily.
js
import NumberInput from '@yaireo/react-number-input'
const MyComponent = () => (
maximumFractionDigits:2,
currency:"USD",
style:"currency",
currencyDisplay:"symbol"
}}
/>
)
`
Props
Prop | Type | Default | Info
----------------------- | ------------------------- |:-----------:| -------------------------------------------------
placeholder | string | |
name | string | |
inputMode | string |"decimal" | MDN docs
onChange | function | |
defaultValue | number | "" |
localeOptions | Object` | | MDN docs