npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rax-ui/checkbox

v1.0.0-beta.62

Published

Rax UI Checkbox

Downloads

10

Readme


display: ComponentName family: other

Checkbox

多选框

API

Props

Checkbox

| 名称 | 说明 | 类型 | 默认值 | | :------------- | :-------------------------------------- | :-------------- | :----- | | checked | 是否选中(受控模式) | bool | | | defaultChecked | 初始选中状态(非受控模式) | bool | | | disabled | 是否禁用 | bool | false | | indeterminate | 设置 indeterminate 状态,只负责样式控制 | | readOnly | 只读模式 | boolean | false | | style | 单选框的 style | object | {} | | className | 单选框的 className | string | | | children | Checkbox 的子元素,一般为右侧说明文案 | any | | | onChange | 改变时回调函数 | Function(value) | |

Checkbox Group

| 名称 | 说明 | 类型 | 默认值 | | :----------- | :-------------------------------------------- | :--------------------- | :--------- | | defaultValue | 初始选中的选项(非受控模式) | string[] | - | | value | 指定选中的选项 | string[] | - | | disabled | 是否禁用 | bool | false | | readOnly | 只读模式 | boolean | false | | direction | 排布方向 可选值:horiontal,vertical | enum | vertical | | data | 数据源 | CheckboxProps[] | | | style | Checkbox Group 的 style | object | {} | | className | Checkbox Group 的 className | string | | | onChange | 改变时回调函数 | Function(checkedValue) | |

CSS API

Checkbox Group

| 名称 | 说明 | | :---------------------------- | :---------------------------------- | | checkbox--group | Checkbox Group 样式 | | checkbox--group__horizontal | Checkbox Group 水平布局时样式 | | checkbox--group_\vertical | Checkbox Group 垂直布局时样式 | | checkbox--group__item | Checkbox Group 中单个 Checkbox 样式 |

Checkbox

| 名称 | 说明 | | :------------------------------------------ | :---------------------------------- | | checkbox__container | Checkbox 盒子样式 | | checkbox__circle | 圆圈样式 | | checkbox--selected__circle | 选中状态的圆圈样式 | | checkbox--press__circle | 按下的圆圈样式 | | checkbox--selected--press__circle | 选中且按下状态的圆圈样式 | | checkbox--disabled__circle | 禁用状态的圆圈样式 | | checkbox--selected--disabled__circle | 选中、禁用状态的圆圈样式 | | checkbox--indeterminate--disabled__circle | indeterminate、禁用状态的圆圈样式 | | checkbox__icon | icon 样式 | | checkbox--selected__icon | 选中状态的 icon 样式 | | checkbox--selected--disabled__icon | 选中、禁用状态的 icon 样式 | | checkbox--indeterminate__icon | indeterminate 状态的 icon 样式 | | checkbox--indeterminate--disabled__icon | indeterminate、禁用状态的 icon 样式 | | checkbox__text | 文案样式 | | checkbox--selected__text | 选中状态的文案样式 | | checkbox--disabled__text | 禁用状态的文案样式 | | checkbox--indeterminate__text | indeterminate 状态的文案样式 | | checkbox--selected--disabled__text | 选中、禁用状态的文案样式 | | checkbox--indeterminate--disabled__text | indeterminate、 禁用状态的文案样式 |