Components

Email

Usage

const employeeEmail = await io.input.email('Employee email')
console.log(employeeEmail) // e.ripley@internalstack.com

Parameters

labelrequired
string

The label to render above the input.

options { ... }
defaultValue
string

Default value rendered in input. Default ''.

disabled
boolean

Disables user input. Default false.

help
string

The small help text to render below the input. Default undefined.

placeholder
string

The placeholder to render within the input. Default undefined.

customValidator
(input: unknown) => Promise<string | true>

An asynchronous function that takes unknown input and outputs either true or an error message string to show the user.