Skip to main content
Big news! Interval has been acquired by Meter. Learn more →

io.input.text

Requests a string value.

Usage

const text = await io.input.text("Company name", {
placeholder: "Acme Inc.",
});
interval.com

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

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