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/radio

v1.0.0-beta.62

Published

--- display: __ComponentName__ family: other ---

Downloads

70

Readme


display: ComponentName family: other

Radio

单选框

API

Props

Radio

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

Radio.Group

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

CSS API

Radio Group

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

Radio

| 名称 | 说明 | | :---------------------------------- | :--------------------------- | | radio__container | radio 样式 | | radio__circle | 外部圆样式 | | radio--selected__circle | 选中时外部圆样式 | | radio--disabled__circle | 不可用时外部圆样式 | | radio--selected--disabled__circle | 不可用且选中时外部圆样式 | | radio__point | 内部点样式 | | radio--selected__point | 选中时内部点样式 | | radio--disabled__point | 不可用时内部点样式 | | radio--selected--disabled__point | 不可用且选中时内部点样式 | | radio__text | 文案样式 | | radio--selected__text | 文案选中样式 | | radio--disabled__text | 不可用时文案样式 | | radio--selected--disabled__text | 不可用且选中选中时,文案样式 | | radio__group | radio 组的样式 |