# bee-checkbox

> checkbox ui component for react

Latest version **2.0.11** (published 2020-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install bee-checkbox
pnpm add bee-checkbox
yarn add bee-checkbox
bun add bee-checkbox
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.11 |
| Published | 2020-04-24 |
| First published | 2016-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 3 |
| Unpacked size | 43.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | ahua52, banyudu, bjyxszd, guoyongfeng, huayingjie, jonyw, kvkens, liushaozhen, liuyk, npm_yx, tinper-bot, whizbz, yangchch, yonyoufed, zhaoyuchief |
| Keywords | react, react-component, react-checkbox, iuap-design, neoui-react, checkbox |

## Links

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

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) ^4.5.0
- [tinper-bee-core](https://npm.io/package/tinper-bee-core.md) latest

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.11 (latest) — 2020-04-24
- 2.0.9-alpha.1 (alpha) — 2020-03-02
- 2.0.10 — 2020-03-06
- 2.0.9-alpha.0 — 2020-03-02
- 2.0.9 — 2019-10-10
- 2.0.8 — 2019-10-10
- 2.0.7 — 2019-09-03
- 2.0.7-alpha.0 — 2019-09-03
- 2.0.6 — 2019-05-24
- 2.0.5 — 2019-04-01
- 2.0.5-alpha.0 — 2019-04-01
- 2.0.4 — 2019-03-29
- 2.0.3 — 2019-03-12
- 2.0.2 — 2019-02-28
- 2.0.1 — 2019-01-23
- … 37 more at https://npm.io/package/bee-checkbox/versions

## README

# bee-checkbox
[![npm version](https://img.shields.io/npm/v/bee-checkbox.svg)](https://www.npmjs.com/package/bee-checkbox)
[![Build Status](https://img.shields.io/travis/tinper-bee/bee-checkbox/master.svg)](https://travis-ci.org/tinper-bee/bee-checkbox)
[![Coverage Status](https://coveralls.io/repos/github/tinper-bee/bee-checkbox/badge.svg?branch=master)](https://coveralls.io/github/tinper-bee/bee-checkbox?branch=master)

复选框

## 使用
使用单独的bee-checkbox包
#### 组件引入
先进行下载bee-checkbox包

```
npm install --save bee-checkbox
```
组件调用
```js
import Checkbox from 'bee-checkbox';

React.render(<div>
        <Checkbox colors="primary" />
</div>, document.getElementById('target'));

```
#### 样式引入
- 可以使用link引入dist目录下bee-checkbox.css
```
<link rel="stylesheet" href="./node_modules/build/bee-checkbox.css">
```
- 可以在js中import样式
```js
import "./node_modules/src/Checkbox.scss"
//或是
import "./node_modules/build/bee-checkbox.css"
```


## API

## Checkbox

|参数|说明|类型|默认值|
|:--|:---|:--|:---|
|className|类名|string|-|
|color|one of: `primary` `success` `info` `danger`  `warning` `dark`|string|''|
|disabled|是否可用|bool|false|
|onChange|监听改变|function|-|
|defaultChecked|默认是否选中|bool|false|
|checked|是否选中|bool|-|
|indeterminate|部分选中|bool|-|
|onDoubleClick|双击事件|function|function(checked, event){}|
|onClick|单击事件|function|function(event){}|
|value|选中的值，需配合CheckboxGroup使用|string|-|
|inverse|设置选中为红色填充|bool|false|


## CheckboxGroup

|参数|说明|类型|默认值|
|:--|:---|:--|:---|
|className|类名|string|-|
|onChange|监听改变|function|-|
|value|设置默认值|array|[]|
|disabled|是否可用|bool|false|

## 已支持的键盘操作

|按键|功能|
|:---|:----|
|space |选中/反选Checkbox|

#### 开发调试

```sh
$ git clone https://github.com/tinper-bee/bee-checkbox
$ cd bee-checkbox
$ npm install
$ npm run dev
```

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