# enquirer-prompt-checkbox

> Adds multiple-choice/checkbox prompt support to Enquirer.

Latest version **0.2.2** (published 2016-09-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install enquirer-prompt-checkbox
pnpm add enquirer-prompt-checkbox
yarn add enquirer-prompt-checkbox
bun add enquirer-prompt-checkbox
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2016-09-21 |
| First published | 2016-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | answer, answers, ask, checkbox, choice, choices, cli, command, enquirer, enquirerprompt, input, inquire, inquirer, interact, list, menu, multiple-choice, password, prompt, prompts, question, readline, stdin, stdout, terminal, tty, ui |

## Links

- npm: https://www.npmjs.com/package/enquirer-prompt-checkbox
- Repository: https://github.com/enquirer/enquirer-prompt-checkbox
- Issues: https://github.com/enquirer/enquirer-prompt-checkbox/issues
- npm.io page: https://npm.io/package/enquirer-prompt-checkbox

## Dependencies (5)

- [log-utils](https://npm.io/package/log-utils.md) ^0.2.1
- [cli-cursor](https://npm.io/package/cli-cursor.md) ^1.0.2
- [prompt-base](https://npm.io/package/prompt-base.md) ^0.3.2
- [radio-symbol](https://npm.io/package/radio-symbol.md) ^0.1.2
- [terminal-paginator](https://npm.io/package/terminal-paginator.md) ^0.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2016-09-21
- 0.2.1 — 2016-08-30
- 0.2.0 — 2016-08-30
- 0.1.3 — 2016-08-30
- 0.1.2 — 2016-08-29
- 0.1.1 — 2016-08-29
- 0.1.0 — 2016-08-29

## README

# enquirer-prompt-checkbox [![NPM version](https://img.shields.io/npm/v/enquirer-prompt-checkbox.svg?style=flat)](https://www.npmjs.com/package/enquirer-prompt-checkbox) [![NPM downloads](https://img.shields.io/npm/dm/enquirer-prompt-checkbox.svg?style=flat)](https://npmjs.org/package/enquirer-prompt-checkbox)

> Adds multiple-choice/checkbox prompt support to Enquirer.

![checkbox prompt example](https://raw.githubusercontent.com/enquirer/enquirer-prompt-checkbox/master/example.gif)

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save enquirer-prompt-checkbox
```

## Usage

```js
var Enquirer = require('enquirer');
var enquirer = new Enquirer();

enquirer.register('checkbox', require('enquirer-prompt-checkbox'));
```

## Example

[Enquirer](https://github.com/jonschlinkert/enquirer) supports both the declarative inquirer-style question format and a functional format using the `.question` method:

**.question**

Functional style questions.

```js
var Enquirer = require('enquirer');
var enquirer = new Enquirer();

enquirer.register('checkbox', require('enquirer-prompt-checkbox'));
enquirer.question('color', 'What is your favorite color?', {
  type: 'checkbox',
  default: 'blue',
  choices: ['red', 'yellow', 'blue']
});

enquirer.ask('color')
  .then(function(answers) {
    console.log(answers)
  });
```

**Inquirer-style questions**

Declarative questions format.

```js
var Enquirer = require('enquirer');
var enquirer = new Enquirer();

enquirer.register('checkbox', require('enquirer-prompt-checkbox'));

var questions = [
  {
    name: 'color',
    message: 'What is your favorite color?',
    type: 'checkbox',
    default: 'blue',
    choices: ['red', 'yellow', 'blue']
  }
];

enquirer.ask(questions)
  .then(function(answers) {
    console.log(answers)
  });
```

## Attribution

Based on the `checkbox` prompt in inquirer.

## About

### Related projects

* [enquirer-prompt](https://www.npmjs.com/package/enquirer-prompt): Base prompt module used for creating custom prompt types for Enquirer. | [homepage](https://github.com/enquirer/enquirer-prompt "Base prompt module used for creating custom prompt types for Enquirer.")
* [enquirer-question](https://www.npmjs.com/package/enquirer-question): Question object, used by Enquirer and prompt plugins. | [homepage](https://github.com/enquirer/enquirer-question "Question object, used by Enquirer and prompt plugins.")
* [enquirer](https://www.npmjs.com/package/enquirer): Plugin-based prompt system for node.js | [homepage](https://github.com/jonschlinkert/enquirer "Plugin-based prompt system for node.js")

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/enquirer/enquirer-prompt-checkbox/blob/master/LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 30, 2016._

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