https://github.com/react-component/checkbox
React Checkbox
https://github.com/react-component/checkbox
Last synced: 4 months ago
JSON representation
React Checkbox
- Host: GitHub
- URL: https://github.com/react-component/checkbox
- Owner: react-component
- License: mit
- Created: 2015-07-10T03:01:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T03:02:02.000Z (about 1 year ago)
- Last Synced: 2025-08-16T04:53:28.278Z (4 months ago)
- Language: TypeScript
- Homepage: https://react-component.github.io/checkbox/
- Size: 2.57 MB
- Stars: 134
- Watchers: 23
- Forks: 108
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.md
Awesome Lists containing this project
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
[](https://npmjs.org/package/rc-checkbox)
## Usage
```js
import checkbox from 'rc-checkbox';
export default () => ;
```
## Compatibility
| [
](http://godban.github.io/browsers-support-badges/)
IE / Edge | [
](http://godban.github.io/browsers-support-badges/)
Firefox | [
](http://godban.github.io/browsers-support-badges/)
Chrome | [
](http://godban.github.io/browsers-support-badges/)
Safari | [
](http://godban.github.io/browsers-support-badges/)
Electron |
| --- | --- | --- | --- | --- |
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## API
name
type
default
description
prefixCls
String
rc-checkbox
className
String
''
additional class name of root node
name
String
same with native input checkbox
checked
enum: 0,1,2
defaultChecked
enum: 0,1,2
0
same with native input checkbox
onChange
Function(e:Event, checked:Number)
called when checkbox is changed. e is native event, checked is original checked state.
## Development
```
npm install
npm start
```
Online demo: http://react-component.github.io/checkbox/
## License
rc-checkbox is released under the MIT license.