Components

Checkbox

Usage

const includeFeature = await io.input.checkbox('Include feature')
console.log(includeFeature) // true

Parameters

labelrequired
string

The label to render above the input.

options { ... }
defaultValue
boolean

Default value rendered in input. Default false.

disabled
boolean

Disables user input. Default false.

help
string

The small help text to render below 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.