Skip to content

io.input.number

Represents a number component.

Usage

ts
const value = await io.input.number("Order ID")
python
value = await io.input.number("Order ID")

example of Forge app with number component

Props

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. Supports inline markdown elements like bold, italics, and links.

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