Skip to main content

io.input.number

Requests a numeric value.

Usage

const email = await io.input.number("Amount", {
helpText: "Enter a number between one and ten.",
min: 1,
max: 10,
});
interval.com

Props

currencyRequired Optional string ISO codeFormat the input to accept a currency value with a default of 2 decimals. One of USD, CAD, EUR, GBP, AUD, CNY, JPY.
decimalsOptional numberThe number of fractional decimal places acceptable.
defaultValueOptional numberDefault value for the input.
helpTextOptional stringOptional label providing additonal context.
maxOptional numberMaximum allowed value.
minOptional numberMinimum allowed value.
placeholderOptional stringText to display in the input when no value is set.
prependOptional stringText to visually prepend to the provided value when displaying it.

Returns: Number

Was this section useful?
On this page