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