The Number Input component for Retool Mobile
An input field to enter a number.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
allowNegativeNumbers
Whether to allow the input of negative numbers.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
iconAfter
The suffix icon to display.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
| ||||
Default |
|
Examples
iconBefore
The prefix icon to display.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
| ||||
Default |
|
Examples
label
The text label to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
labelCaption
The additional text to display with the label.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
|
maxLength
The maximum number of characters to allow.
Type | number | ||||
Format | Integer | ||||
Mutability |
| ||||
Default |
|
Examples
minLength
The minimum number of characters to allow.
Type | number | ||||
Format | Integer | ||||
Mutability |
| ||||
Default |
|
Examples
placeholder
The text to display within the input field when there is no value.
Type | string | ||||
Format | string | ||||
Mutability |
| ||||
Default |
|
Examples
showStepper
Whether the input field includes buttons to adjust the value incrementally.
Type | boolean | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
numberInput.clearValidation()
Clear the validation message from the input field.
numberInput.clearValidation()
Examples
numberInput.resetValue()
Reset the current value to the default value.
numberInput.resetValue()
Examples
numberInput.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
numberInput.setDisabled(disabled)
Parameters
Examples
numberInput.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
numberInput.setHidden(hidden)
Parameters
Examples
numberInput.setValue()
Set the current value.
numberInput.setValue(value)
Parameters
Examples
numberInput.validate()
Validates the value of the input field.
numberInput.validate()
Examples
Events
Events triggered by user interactions. Use event handlers to trigger queries or other actions in response to events.