# rc-checkbox

> checkbox ui component for react

Latest version **3.5.0** (published 2024-11-20) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.5.0 |
| Published | 2024-11-20 |
| First published | 2015-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 20 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 132 |
| Maintainers | afc163, yiminghe, zombiej, raohai, madccc |
| Keywords | react, react-component, react-checkbox, checkbox |

## Links

- npm: https://www.npmjs.com/package/rc-checkbox
- Repository: https://github.com/react-component/checkbox
- Homepage: http://github.com/react-component/checkbox
- Issues: http://github.com/react-component/checkbox/issues
- npm.io page: https://npm.io/package/rc-checkbox

## Dependencies (3)

- [rc-util](https://npm.io/package/rc-util.md) ^5.25.2
- [classnames](https://npm.io/package/classnames.md) ^2.3.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.10.1

## 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

- 3.5.0 (latest) — 2024-11-20
- 3.4.0 — 2024-11-19
- 3.3.0 — 2024-05-17
- 3.2.0 — 2024-02-29
- 3.1.0 — 2023-06-14
- 3.0.1 — 2023-05-10
- 3.0.0 — 2023-03-07
- 2.3.2 — 2020-12-08
- 2.3.1 — 2020-07-15
- 2.3.0 — 2020-07-09
- 2.2.0 — 2020-03-30
- 2.1.8 — 2019-09-24
- 2.1.7 — 2019-06-05
- 2.1.6 — 2018-12-23
- 2.1.5 — 2018-02-24
- … 35 more at https://npm.io/package/rc-checkbox/versions

## README

# rc-checkbox

---

Checkbox ui component for react.

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![build status][github-actions-image]][github-actions-url]
[![Codecov][codecov-image]][codecov-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[![dumi][dumi-image]][dumi-url]

[npm-image]: http://img.shields.io/npm/v/rc-checkbox.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-checkbox
[travis-image]: https://img.shields.io/travis/react-component/checkbox/master?style=flat-square
[travis-url]: https://travis-ci.com/react-component/checkbox
[github-actions-image]: https://github.com/react-component/checkbox/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/checkbox/actions
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/checkbox/master.svg?style=flat-square
[codecov-url]: https://app.codecov.io/gh/react-component/checkbox
[david-url]: https://david-dm.org/react-component/checkbox
[david-image]: https://david-dm.org/react-component/checkbox/status.svg?style=flat-square
[david-dev-url]: https://david-dm.org/react-component/checkbox?type=dev
[david-dev-image]: https://david-dm.org/react-component/checkbox/dev-status.svg?style=flat-square
[download-image]: https://img.shields.io/npm/dm/rc-checkbox.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-checkbox
[bundlephobia-url]: https://bundlephobia.com/package/rc-checkbox
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-checkbox
[dumi-url]: https://github.com/umijs/dumi
[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square

## Install

[![rc-checkbox](https://nodei.co/npm/rc-checkbox.png)](https://npmjs.org/package/rc-checkbox)

## Usage

```js
import checkbox from 'rc-checkbox';

export default () => <checkbox />;
```

## Compatibility

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Electron |
| --- | --- | --- | --- | --- |
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

## API

<table class="table table-bordered table-striped">
  <thead>
  <tr>
    <th style="width: 100px;">name</th>
    <th style="width: 50px;">type</th>
    <th style="width: 50px;">default</th>
    <th>description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td>prefixCls</td>
      <td>String</td>
      <td>rc-checkbox</td>
      <td></td>
    </tr>
    <tr>
      <td>className</td>
      <td>String</td>
      <td>''</td>
      <td>additional class name of root node</td>
    </tr>
      <tr>
      <td>name</td>
      <td>String</td>
      <td></td>
      <td>same with native input checkbox</td>
    </tr>
    <tr>
      <td>checked</td>
      <td>enum: 0,1,2</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>defaultChecked</td>
      <td>enum: 0,1,2</td>
      <td>0</td>
      <td>same with native input checkbox</td>
    <tr>
      <td>onChange</td>
      <td>Function(e:Event, checked:Number)</td>
      <td></td>
      <td>called when checkbox is changed. e is native event, checked is original checked state.</td>
    </tr>
  </tbody>
</table>

## Development

```
npm install
npm start
```

Online demo: http://react-component.github.io/checkbox/

## License

rc-checkbox is released under the MIT license.

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