Input.number
Number input field.
Usage
Preview
Runtime State
The value in the runtime state is the number
value of the input.
As demonstrated by the Usage example above, you can access variables from the Runtime State
via the "{{age}}"
syntax from elsewhere in your Buttonize app.
Props
label
Optional
placeholder
Optional
disabled
Optional
Whether or not the input is disabled. Default is false
.
min
Optional
Min value for the input. After clicking outside of the input field,
validation is performed and if the input value is lower than min
(if
specified) the input value is set to min
.
max
Optional
Max value for the input. After clicking outside of the input field,
validation is performed and if the input value is higher than max
(if
specified) the input value is set to max
.
step
Optional
Interval between legal numbers in the input field.
After clicking outside of the input field, validation is performed
and if the input value is not a multiple of step
(if specified) the input value is rounded
to the nearest step
.
Example: if step = 3
, legal numbers could be -3, 0, 3, 6, etc.
allowEmpty
Optional
Allow null
value to be stored in the Runtime State when the input field is empty.
This can happen when user removes all the numbers from the input.
After clicking outside of the input field, validation is performed and if allowEmpty
is set to false
and the input value is empty (null
) the input value is set to min
value (if specified) or 0
, or max
value, depending which one is lower.
Default is true
.
spacingTop
Optional
The amount of space to give above the component.
spacingBottom
Optional
The amount of space to give below the component.
width
Optional