@inquirer/expand

Interactive expand prompt for collecting user input in CLI applications.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer checkbox prompt

Examples

show multiple choice options and let user pick one$ const { expand } = require('@inquirer/expand'); const answer = await expand({ message: 'Select action', choices: [{key: 'a', name: 'Add', value: 'add'}, {key: 'd', name: 'Delete', value: 'delete'}] });
create interactive menu with keyboard shortcuts$ const { expand } = require('@inquirer/expand'); const action = await expand({ message: 'What next?', choices: [{key: 's', name: 'Save', value: 'save'}, {key: 'e', name: 'Exit', value: 'exit'}] });
build cli tool with single character selection prompt$ const { expand } = require('@inquirer/expand'); const choice = await expand({ message: 'Choose operation', choices: [{key: 'y', name: 'Yes', value: true}, {key: 'n', name: 'No', value: false}] });
get user confirmation with letter key options$ const { expand } = require('@inquirer/expand'); const confirmed = await expand({ message: 'Proceed?', choices: [{key: 'y', name: 'Yes proceed', value: true}, {key: 'c', name: 'Cancel', value: false}] });
collect user action with help text and descriptions$ const { expand } = require('@inquirer/expand'); const result = await expand({ message: 'Action', choices: [{key: 'c', name: 'Create file', value: 'create'}, {key: 'e', name: 'Edit file', value: 'edit'}] });