io.input.number
Requests a numeric value.
Usage
- TypeScript
- JavaScript
- Python Experimental
const amount = await io.input.number("Amount", {
helpText: "Enter a number between one and ten.",
min: 1,
max: 10,
});
const amount = await io.input.number("Amount", {
helpText: "Enter a number between one and ten.",
min: 1,
max: 10,
});
email = await io.input.number("Amount",
help_text="Enter a number between one and ten.",
min=1,
max=10,
)
interval.com
Props
- TypeScript
- JavaScript
- Python Experimental
currency
Optional
string
Format the input to accept a currency value with a default of 2 decimals. One of USD, CAD, EUR, GBP, AUD, CNY, JPY.
decimals
Optional
number
The number of fractional decimal places acceptable.
defaultValue
Optional
number
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Optional label providing additional context.
max
Optional
number
Maximum allowed value.
min
Optional
number
Minimum allowed value.
placeholder
Optional
string
Text to display in the input when no value is set.
prepend
Optional
string
Text to visually prepend to the provided value when displaying it.
Returns
number
currency
Optional
string
Format the input to accept a currency value with a default of 2 decimals. One of USD, CAD, EUR, GBP, AUD, CNY, JPY.
decimals
Optional
number
The number of fractional decimal places acceptable.
defaultValue
Optional
number
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Optional label providing additional context.
max
Optional
number
Maximum allowed value.
min
Optional
number
Minimum allowed value.
placeholder
Optional
string
Text to display in the input when no value is set.
prepend
Optional
string
Text to visually prepend to the provided value when displaying it.
Returns
number
currency
Optional
str
Format the input to accept a currency value with a default of 2 decimals. One of USD, CAD, EUR, GBP, AUD, CNY, JPY.
decimals
Optional
int
The number of fractional decimal places acceptable.
default_value
Optional
float | int
Default value for the input.
disabled
Optional
bool
Whether the input is disabled, preventing edits to the default value.
help_text
Optional
str
Secondary label for providing additional context.
max
Optional
float | int
Maximum allowed value.
min
Optional
float | int
Minimum allowed value.
placeholder
Optional
str
Text to display in the input when no value is set.
prepend
Optional
str
Text to visually prepend to the provided value when displaying it.
Returns
float | int
Did this section clearly explain what you wanted to learn?