const featuresToEnable = await io.input.checkboxes('Pick features to enable', [
{
value: 'feature-analytics',
label: 'Enhanced Analytics',
help: 'Provides advanced data insights and reporting capabilities.',
},
{
value: 'feature-chat',
label: 'Chat Support (beta)',
help: 'Enables real-time chat support for customers.',
},
{
value: 'feature-darkmode',
label: 'Dark Mode',
help: 'Allows users to switch to a dark theme.',
disabled: true,
},
{
value: 'feature-audit-log',
label: 'Detailed Audit Log',
help: 'Tracks all user actions for compliance and accountability.',
}
])
console.log(featuresToEnable) // ['feature-audit-log', 'feature-chat']
The label to render above the input.
The label to render alongside the checkbox.
The value to return when checked.
Disables user input. Default false.
The small help text to render below the checkbox label. Default undefined.
Disables user input. Default false.
Checked by default. Default [].
The small help text to render below the label. Default undefined.
An asynchronous function that takes unknown input and outputs either true or an error message string to show the user.