Skip to content

io.input.text ​

Represents a text component.

Usage ​

ts
const value = await io.input.text("Comments")
python
value = await io.input.text("Comments")

example of Forge app with text component

Props ​

defaultValue Optional ​

string
Default value for the input.

disabled Optional ​

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

helpText Optional ​

string
Secondary label for providing additional context. Supports inline markdown elements like bold, italics, and links.

lines Optional ​

number
Initial number of lines when multiline is set to true. Defaults to 3.

maxLength Optional ​

number
Maximum number of characters allowed in the input.

minLength Optional ​

number
Minimum number of characters allowed in the input.

multiline Optional ​

boolean
Whether the text input should be resizable and support multiple lines. Defaults to false.

placeholder Optional ​

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

Returns ​

string