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

currency

string Optional

Format the input to accept a currency value with a default of 2 decimals. One of USD, CAD, EUR, GBP, AUD, CNY, JPY.

decimals

number Optional

The number of fractional decimal places acceptable.

defaultValue

number Optional

Default value for the input.

disabled

boolean Optional

Whether the input is disabled, preventing edits to the `defaultValue`.

helpText

string Optional

Optional label providing additonal context.

max

number Optional

Maximum allowed value.

min

number Optional

Minimum allowed value.

placeholder

string Optional

Text to display in the input when no value is set.

prepend

string Optional

Text to visually prepend to the provided value when displaying it.

Returns

number

Did this section clearly explain what you wanted to learn?
On this page