# inquirer-multi-choice

> A multiple choice prompt for Inquirer

Latest version **0.0.1** (published 2020-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install inquirer-multi-choice
pnpm add inquirer-multi-choice
yarn add inquirer-multi-choice
bun add inquirer-multi-choice
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-12-18 |
| First published | 2020-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | @filoxo |
| Maintainers | filoxo |
| Keywords | inquirer, cli, prompt |

## Links

- npm: https://www.npmjs.com/package/inquirer-multi-choice
- Repository: https://github.com/filoxo/inquirer-multi-choice
- Homepage: https://github.com/filoxo/inquirer-multi-choice#readme
- Issues: https://github.com/filoxo/inquirer-multi-choice/issues
- npm.io page: https://npm.io/package/inquirer-multi-choice

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.3
- [cli-cursor](https://npm.io/package/cli-cursor.md) ^3.1.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-12-18

## README

# inquirer-multi-choice [![npm version](https://badge.fury.io/js/inquirer-multi-choice.svg)](https://badge.fury.io/js/inquirer-multi-choice)

> A multiple choice prompt for [Inquirer.js](https://github.com/SBoudrias/Inquirer.js)

![Screen capture of the table prompt](screen-capture.gif)

## Installation

```
npm install --save inquirer-multi-choice
```

## Usage

After registering the prompt, set any question to have `type: "mutli-choice"` to make use of this prompt.

The result will be an array, containing the value for each row.

```js
inquirer.registerPrompt('multi-choice', require('inquirer-multi-choice'));

inquirer
  .prompt([
    {
      type: 'multi-choice',
      name: 'settings',
      message: 'Change settings',
      rows: [
        {
          name: 'Enabled',
          choices: ['on', 'off'],
        },
        {
          name: 'Color',
          choices: [
            {
              name: 'red',
              value: '#f00',
            },
            {
              name: 'green',
              value: '#0f0',
            },
            {
              name: 'blue',
              value: '#00f',
            },
          ],
        },
        {
          name: 'Log',
          default: 'false',
          choices: ['true', 'false'],
        },
      ],
    },
  ])
  .then((answers) => {
    console.log(answers);
    /*
      {
        settings: {
          Enabled: 'on',
          Color: 'red',
          Log: 'true'
        }
      }
    */
  });
```

### Options

- `rows`: Array of objects. Follows the same format as Inquirer's `choices`

---
_Source: https://npm.io/package/inquirer-multi-choice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
