Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-checkbox

Package Overview
Dependencies
Maintainers
13
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-checkbox

checkbox ui component for react

  • 2.0.5-alpha.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
134
decreased by-11.26%
Maintainers
13
Weekly downloads
 
Created
Source

bee-checkbox

npm version Build Status Coverage Status

复选框

使用

使用单独的bee-checkbox包

组件引入

先进行下载bee-checkbox包

npm install --save bee-checkbox

组件调用

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样式
import "./node_modules/src/Checkbox.scss"
//或是
import "./node_modules/build/bee-checkbox.css"

API

Checkbox

参数说明类型默认值
className类名string-
colorone of: primary success info danger warning darkstring''
disabled是否可用boolfalse
onChange监听改变function-
defaultChecked默认是否选中boolfalse
checked是否选中bool-
indeterminate部分选中bool-
onDoubleClick双击事件functionfunction(checked, event){}
onClick单击事件functionfunction(event){}
value选中的值,需配合CheckboxGroup使用string-
inverse设置选中为红色填充boolfalse

CheckboxGroup

参数说明类型默认值
className类名string-
onChange监听改变function-
value设置默认值array[]
disabled是否可用boolfalse

已支持的键盘操作

按键功能
space选中/反选Checkbox
开发调试
$ git clone https://github.com/tinper-bee/bee-checkbox
$ cd bee-checkbox
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 01 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc