React Native JS-only amount (decimal) input component
npm install react-native-amount-input

!Supports iOS
!MIT License

React Native JS-only amount (decimal) input component. Optimized for iOS.

$ npm install react-native-amount-input --save
Import AmountInput and use it more or less like the regular TextInput component from React Native core.
``javascript
import {AmountInput} from 'react-native-amount-input';
function MyComponent() {
return (
defaultQuantity={defaultQuantity}
onChangeQuantity={handleChangeQuantity}
/>
);
}
`
In addition to the regular TextInput props, you can also provide the following props for extra customization:
- currency
- defaultQuantity
- onChangeQuantity
- TextInputComponent
---
Sets the currency for a fixed symbol prefix in the text input box. Has to be a ISO 4217 currency code.
| Type | Required |
| -------- | -------- |
| string | No |
Provides an initial value that will change when the user starts typing.
| Type | Required |
| -------- | -------- |
| number | No |
Callback that is called when the entered quantity changes. Changed quantity is passed as a single string argument to the callback handler.
| Type | Required |
| ---------------- | -------- |
| number => void | No |
Sets the base text input component.
| Type | Required |
| ------------------ | -------- |
| typeof TextInput` | No |
MIT License © Alka, Inc