NumberInput
Number Input to create an input with a formatted number
(code example)
note
This requires RN67 to work on Android.
Usage
Live Editor
<NumberInput initialValue={1506} onChange={onChange} placeholder={'Price'}/>
Result
Loading...
API
containerStyle
Container style of the whole component
ViewStyle
contextMenuHidden
Requires @react-native-community/clipboard to be installed.
If true, context menu is hidden.
boolean
fractionDigits
Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
number
initialNumber
A valid number (in en locale, i.e. only digits and a decimal point).
number
leadingText
A leading text
string
leadingTextStyle
The style of the leading text
TextStyle
onChangeNumber
Callback that is called when the number value has changed.
(data: NumberInputData) => void
textFieldProps
Most of TextField's props can be applied, except for ones that are passed directly via named props.
TextFieldProps
trailingText
A trailing text
string
trailingTextStyle
The style of the trailing text
TextStyle