formatted-number-inputDrop-in formatted number input
A replacement for and React Native TextInput with automatic comma formatting, decimal rounding, and smart cursor management
A replacement for and React Native TextInput with automatic comma formatting, decimal rounding, and smart cursor management
import { FormattedNumberInputHtmlLike } from 'formatted-number-input';
const [value, setValue] = useState(1234567);
<FormattedNumberInputHtmlLike
value={value}
onChangeNumber={setValue}
className="my-input"
/>;<input> or RN TextInput with minimal changesmaxDecimalPlaces with displayAndOutput or displayOnly roundingIntl.NumberFormat