使用场景
单选框(Radio)也叫单选按钮,它允许用户在一组选项中选择其中一个。
当选项很多时,单选下拉菜单(Select)可能比较适合,因为它所占用的画面空间比单选按钮来得要少。
代码演示
如何引入
import { Radio, RadioGroup } from '@fibrous/semi-ui-react';
基本用法
代码
import { Radio } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<Radio aria-label="单选示例" name="demo-radio">
Radio
</Radio>
);
}带辅助文本
通过extra设置辅助文本,可以是任意类型的 ReactNode
代码
import { Radio } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<Radio extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" aria-label="单选示例" name="demo-radio-extra">
Semi Design
</Radio>
);
}禁用
Radio 不可用
代码
import { useState } from 'react';
import { Radio, Button } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
const [disabled, setDisabled] = useState(true);
const toggleDisabled = () => {
setDisabled(!disabled);
};
return (
<div>
<Radio defaultChecked={false} disabled={disabled} aria-label="单选示例" name="demo-radio-disabled">
Disabled
</Radio>
<br />
<Radio defaultChecked disabled={disabled} aria-label="单选示例" name="demo-radio-defaultChecked-disabled">
Disabled
</Radio>
<div style={{ marginTop: 20 }}>
<Button type="primary" onClick={toggleDisabled}>
Toggle disabled
</Button>
</div>
</div>
);
}高级模式
高级模式(mode='advanced')checked 可以通过点击转换为 unchecked。
代码
import { useState } from 'react';
import { Radio, type RadioChangeEvent } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
const [checked, setChecked] = useState(true);
const toggle = (e: RadioChangeEvent) => {
console.log('radio checked', e.target.checked);
setChecked(e.target.checked);
};
return (
<Radio checked={checked} mode="advanced" onChange={toggle} aria-label="单选示例" name="demo-radio-advanced">
允许取消选择
</Radio>
);
}单选组合
一组互斥的 Radio 配合使用
代码
import { useState } from 'react';
import { RadioGroup, Radio, type RadioChangeEvent } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
const [value, setValue] = useState(1);
const onChange = (e: RadioChangeEvent) => {
console.log('radio checked', e.target.value);
setValue(e.target.value);
};
return (
<RadioGroup onChange={onChange} value={value} aria-label="单选组合示例" name="demo-radio-group">
<Radio value={1}>A</Radio>
<Radio value={2}>B</Radio>
<Radio value={3}>C</Radio>
<Radio value={4}>D</Radio>
</RadioGroup>
);
}垂直排列
可通过给 RadioGroup 设置 direction属性来决定 组内的 radio 元素水平排列或者垂直排列
代码
import { RadioGroup, Radio } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<RadioGroup direction="vertical" aria-label="单选组合示例" name="demo-radio-group-vertical">
<Radio value={1}>A</Radio>
<Radio value={2}>B</Radio>
<Radio value={3}>C</Radio>
<Radio value={4}>D</Radio>
</RadioGroup>
);
}按钮样式
可以利用 type='button' 来设置 button 样式类型的单选器,并且,button 类型单选器支持三种尺寸大小。
需要注意的是: button 类型的单选器暂不支持辅助文本(extra)和垂直排列(direction='vertical')。
代码
import { RadioGroup, Radio, Space } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<Space vertical spacing="loose" align="start">
<RadioGroup type="button" buttonSize="small" defaultValue={1} aria-label="单选组合示例" name="demo-radio-small">
<Radio value={1}>即时推送</Radio>
<Radio value={2}>定时推送</Radio>
<Radio value={3}>动态推送</Radio>
</RadioGroup>
<RadioGroup type="button" buttonSize="middle" defaultValue={1} aria-label="单选组合示例" name="demo-radio-middle">
<Radio value={1}>即时推送</Radio>
<Radio value={2}>定时推送</Radio>
<Radio value={3}>动态推送</Radio>
</RadioGroup>
<RadioGroup type="button" buttonSize="large" defaultValue={1} aria-label="单选组合示例" name="demo-radio-large">
<Radio value={1}>即时推送</Radio>
<Radio value={2}>定时推送</Radio>
<Radio value={3}>动态推送</Radio>
</RadioGroup>
</Space>
);
}卡片样式
可以给 RadioGroup 设置 type='card' 实现带有背景的卡片样式。
代码
import { RadioGroup, Radio } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<RadioGroup type="card" defaultValue={2} direction="vertical" aria-label="单选组合示例" name="demo-radio-group-card">
<Radio value={1} disabled extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
<Radio value={2} extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
<Radio value={3} extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
</RadioGroup>
);
}无 radio 的纯卡片样式
可以给 RadioGroup 设置 type='pureCard' 实现带有背景且无 radio 的纯卡片样式。
代码
import { RadioGroup, Radio } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
return (
<RadioGroup type="pureCard" defaultValue={2} direction="vertical" aria-label="单选组合示例" name="demo-radio-group-pureCard">
<Radio value={1} disabled extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
<Radio value={2} extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
<Radio value={3} extra="Semi Design 是由抖音前端团队与 UED 团队共同设计开发并维护的设计系统" style={{ width: 280 }}>
单选框标题
</Radio>
</RadioGroup>
);
}配置 options
通过配置 options 参数来渲染单选框
代码
import { useState } from 'react';
import { RadioGroup, Space, type RadioChangeEvent } from '@fibrous/semi-ui-react';
export default function RadioDemo() {
const [value1, setValue1] = useState('Guest');
const [value2, setValue2] = useState('Developer');
const [value3, setValue3] = useState('Maintainer');
const plainOptions = ['Guest', 'Developer', 'Maintainer'];
const options = [
{ label: 'Guest', value: 'Guest', extra: 'Semi Design', style: { width: 120 } },
{ label: 'Developer', value: 'Developer', extra: 'Semi Design', style: { width: 120 } },
{ label: 'Maintainer', value: 'Maintainer', extra: 'Semi Design', style: { width: 120 } },
];
const optionsWithDisabled = [
{ label: 'Guest', value: 'Guest' },
{ label: 'Developer', value: 'Developer' },
{ label: 'Maintainer', value: 'Maintainer', disabled: true },
];
const onChange1 = (e: RadioChangeEvent) => {
console.log('radio1 checked', e.target.value);
setValue1(e.target.value);
};
const onChange2 = (e: RadioChangeEvent) => {
console.log('radio2 checked', e.target.value);
setValue2(e.target.value);
};
const onChange3 = (e: RadioChangeEvent) => {
console.log('radio3 checked', e.target.value);
setValue3(e.target.value);
};
return (
<Space vertical align="start" spacing="loose">
<RadioGroup options={plainOptions} onChange={onChange1} value={value1} aria-label="单选组合示例" name="demo-radio-group-1" />
<RadioGroup options={optionsWithDisabled} onChange={onChange2} value={value2} aria-label="单选组合示例" name="demo-radio-group-2" />
<RadioGroup options={options} onChange={onChange3} value={value3} aria-label="单选组合示例" name="demo-radio-group-3" />
</Space>
);
}API 参考
Radio
Props
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| addonClassName | 包裹内容容器的类名。 | string | - |
| addonId | addon 节点的 id,aria-labelledby 指向这个 id;未设置时随机生成。 | string | - |
| addonStyle | 包裹内容容器的内联样式。 | React.CSSProperties | - |
| autoFocus | 挂载后自动获取焦点,作用于内部的原生 input。 | boolean | false |
| checked | 是否选中,受控使用;在 RadioGroup 中使用时无效。 | boolean | - |
| children | 选项文字,可以是任意 ReactNode,渲染在 addon 节点中。 | React.ReactNode | - |
| className | 根 label 元素的类名。 | string | - |
| defaultChecked | 初始是否选中,非受控使用;在 RadioGroup 中使用时无效。 | boolean | false |
| disabled | 是否禁用;所在 RadioGroup 禁用时同样禁用。 | boolean | - |
| displayMode | 设为 vertical 时 Radio 以块级元素独占一行。 | RadioDisplayMode | - |
| extra | 辅助文本,可以是任意 ReactNode,渲染在选项文字下方,aria-describedby 指向它;type 为 button 时不渲染。 | React.ReactNode | - |
| extraId | extra 节点的 id,aria-describedby 指向这个 id;未设置时随机生成。 | string | - |
| mode | 设为 advanced 时,已选中的 Radio 可以通过点击或空格取消选中;在 RadioGroup 中以组的 mode 为准。 | RadioMode | "" |
| name | 原生 input 的 name,优先于所在 RadioGroup 的 name。 | string | - |
| onChange | 选中状态变化时的回调,event.target 包含 checked、value、name 和 disabled。 | Type(e: RadioChangeEvent) => void | - |
| prefixCls | CSS 类名前缀,未设置时依次取所在 RadioGroup 的值与全局默认值,最后为 semi-radio。 | string | - |
| preventScroll | 聚焦时是否阻止浏览器滚动到该元素,作用于 focus() 方法。 | boolean | - |
| ref | 句柄,提供 focus() 与 blur() 方法,见下方 Methods。 | TypeReact.Ref<RadioHandle> | - |
| style | 根 label 元素的内联样式。 | React.CSSProperties | - |
| type | 样式类型,可选 default、button、card 或 pureCard;在 RadioGroup 中以组的 type 为准。 | RadioType | "default" |
| value | Radio 的值,RadioGroup 据此判断是否选中;同时作为原生 input 的 value 参与表单提交。 | string | number | boolean | - |
Methods
| 方法 | 说明 | 类型 |
|---|---|---|
| blur | 移除焦点,作用于内部的原生 input。 | Type() => void |
| focus | 获取焦点,作用于内部的原生 input,是否滚动由 preventScroll 属性决定。 | Type() => void |
id、name、tabIndex、autoFocus、aria-label、aria-labelledby、aria-describedby、aria-invalid 与 aria-errormessage 落在内部的原生 input 上,其余原生属性与事件(如 onMouseEnter、onMouseLeave、onFocus、onBlur)落在根 label 上。onClick 也在根 label 上,但只在点击内部 input 时触发,点击文字时只触发一次。单个 Radio 不支持 aria-required,传入后会被忽略。
RadioGroup
单选框组合,用于包裹一组 Radio。
Props
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| buttonSize | type 为 button 时按钮的尺寸,可选 small、middle 或 large。 | RadioGroupButtonSize | "middle" |
| children | 组内的 Radio,设置了 options 时忽略。 | React.ReactNode | - |
| className | 根元素的类名。 | string | - |
| defaultValue | 非受控时默认选中的值。 | string | number | boolean | - |
| direction | 组内 Radio 的排列方向,可选 horizontal 或 vertical;type 为 button 时不生效。 | 'horizontal' | 'vertical' | "horizontal" |
| disabled | 是否禁用整组。 | boolean | false |
| id | 根元素的 id。 | string | - |
| mode | 设为 advanced 时,已选中的 Radio 可以通过点击或空格取消选中;取消选中时 event.target.value 为 undefined。 | RadioMode | "" |
| name | 组内所有原生 input 的 name;未设置时每组生成唯一值。 | string | - |
| onChange | 选中的值变化时的回调,mode 为 advanced 时每次点击都会触发;event.target 包含 checked、value、name 和 disabled。 | Type(event: RadioChangeEvent) => void | - |
| options | 以配置形式声明选项,元素为字符串或 { label, value, disabled, extra, className, style, addonId, addonStyle, addonClassName, extraId },label 与 extra 可以是 ReactNode。 | Options | - |
| prefixCls | CSS 类名前缀。 | string | - |
| ref | 根 div 元素的引用。 | TypeReact.Ref<HTMLDivElement> | - |
| style | 根元素的内联样式。 | React.CSSProperties | - |
| type | 组内所有 Radio 的样式类型,可选 default、button、card 或 pureCard。 | RadioType | "default" |
| value | 选中的值,受控使用。 | string | number | boolean | - |
aria-label、aria-required、aria-invalid、aria-errormessage 与 onBlur 等原生属性落在 role="radiogroup" 的根 div 上,onBlur 只在焦点离开整个分组时触发。Tooltip 注入的 aria-expanded、aria-haspopup、aria-controls 与 tabIndex 不输出。
Methods
Radio
ref 取得的句柄(RadioHandle)提供 focus() 与 blur(),作用于内部的原生 input;focus() 是否滚动由 preventScroll 属性决定,成员见上方 API 参考。
Accessibility
ARIA
aria-label:用于解释 Radio 或 RadioGroup 的作用aria-labelledby默认指向 addon 节点,用于解释 Radio 的内容aria-describedby默认指向 extra 节点,用于补充解释 Radio 的内容
aria-required、aria-invalid、aria-errormessage只对 RadioGroup 生效,设置在role="radiogroup"的元素上(Form.RadioGroup的必填与校验状态同样落在它上面);单个 Radio 的 ARIA 不支持这些属性,Form.Radio校验失败时,错误信息通过aria-describedby关联到 input
键盘和焦点
WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/
- RadioGroup 可以被获取焦点,初始焦点设置:
- 当 RadioGroup 中没有被选择项时,初始焦点为第一个 Radio 项上
- 当 RadioGroup 中有选中项时,初始焦点为选中的 Radio 项上
- 在同一个 radiogroup 内
- 可以通过
右箭头或下箭头将焦点移动到下一个 Radio 项上,同时取消先前的 Radio 项的选中状态,并选中当前聚焦的 Radio 项 - 可以通过
左箭头或上箭头将焦点移动到上一个 Radio 项上,同时取消先前的 Radio 项的选中状态,并选中当前聚焦的 Radio 项
- 可以通过
- 若 RadioGroup 中没有选中项,可以
Space键选中初始焦点 mode="advanced"仍然是 radio:方向键照常移动选中项,对已选中的项点击或按Space可取消选中。
文案规范
- 首字母大写
- 不使用标点符号
设计变量
| Sass 变量 | 值 | 用法 |
|---|---|---|
| $transition_duration-radio-bg | var(--semi-transition_duration-none) | 单选框-背景色-动画持续时间 |
| $transition_function-radio-bg | var(--semi-transition_function-easeIn) | 单选框-背景色-过渡曲线 |
| $transition_delay-radio-bg | var(--semi-transition_delay-none) | 单选框-背景色-延迟时间 |
| $transition_duration-radio-border | var(--semi-transition_duration-none) | 单选框-边框-动画持续时间 |
| $transition_function-radio-border | var(--semi-transition_function-easeIn) | 单选框-边框-过渡曲线 |
| $transition_delay-radio-border | var(--semi-transition_delay-none) | 单选框-边框-延迟时间 |
| $color-radio_default-border-default | var(--semi-color-text-3) | 单选圆圈描边颜色 - 默认态 |
| $color-radio_default-bg-default | transparent | 单选圆圈背景颜色 - 默认态 |
| $color-radio_default-bg-hover | var(--semi-color-fill-0) | 单选圆圈背景颜色 - 悬浮态 |
| $color-radio_default-bg-active | var(--semi-color-fill-1) | 单选圆圈背景颜色 - 按下态 |
| $color-radio_default-border-hover | var(--semi-color-focus-border) | 单选圆圈描边颜色 - 悬浮态 |
| $color-radio_checked-border-hover | var(--semi-color-primary-hover) | 选中状态单选圆圈描边颜色 - 悬浮态 |
| $color-radio_checked-border-active | var(--semi-color-primary-active) | 选中状态单选圆圈描边颜色 - 按下态 |
| $color-radio_default-text-default | var(--semi-color-text-0) | 选项文本颜色 |
| $color-radio_extra-text-default | var(--semi-color-text-2) | 辅助文本颜色 |
| $color-radio_primary-bg-hover | var(--semi-color-primary-hover) | 选中状态单选圆圈背景颜色 - 悬浮态 |
| $color-radio_primary-bg-active | var(--semi-color-primary-active) | 选中状态单选圆圈背景颜色 - 按下态 |
| $color-radio_primary-border-default | var(--semi-color-primary) | 选中状态单选圆圈描边颜色 - 默认态 |
| $color-radio_primary-bg-default | var(--semi-color-primary) | 选中状态单选圆圈背景颜色 - 默认态 |
| $color-radio_primary-text-default | var(--semi-white) | 选中状态单选圆圈中心圆点颜色 |
| $color-radio_checked-bg-disabled | var(--semi-color-primary-disabled) | 选中状态单选圆圈背景颜色 - 禁用态 |
| $color-radio_default-border-disabled | var(--semi-color-border) | 单选圆圈描边颜色 - 禁用态 |
| $color-radio_checked-border-disabled | var(--semi-color-primary-disabled) | 选中状态单选圆圈描边颜色 - 禁用态 |
| $color-radio_disabled-bg-default | var(--semi-color-disabled-fill) | 单选圆圈背景颜色 - 禁用态 |
| $color-radio_disabled-bg-hover | transparent | |
| $color-radio_disabled-text-default | var(--semi-color-disabled-text) | 禁用态文本颜色 |
| $color-radio_disabled-border-default | var(--semi-color-border) | 单选圆圈描边颜色 - 禁用态 |
| $color-radio_checked-icon-disabled | var(--semi-white) | 选中且禁用状态下中心圆点颜色 |
| $color-radio_buttonRadio-text-default | var(--semi-color-text-1) | 按钮样式单选文本颜色 |
| $color-radio_buttonRadio-bg-default | var(--semi-color-fill-0) | 按钮样式单选背景颜色 |
| $color-radio_buttonRadio-text-disabled | var(--semi-color-disabled-text) | 按钮样式单选禁用态文本颜色 |
| $color-radio_addon_buttonRadio-bg-hover | var(--semi-color-fill-1) | 按钮样式单选悬浮态背景色 |
| $color-radio_addon_buttonRadio-text-checked | var(--semi-color-primary) | 按钮样式单选选中项文字颜色 |
| $color-radio_addon_buttonRadio-bg-checked | var(--semi-color-bg-3) | 按钮样式单选选中项背景颜色 |
| $color-radio_cardRadioGroup-bg-default | transparent | 卡片样式单选默认背景色 |
| $color-radio_cardRadioGroup-bg-checked | var(--semi-color-primary-light-default) | 卡片样式单选选中态背景色 |
| $color-radio_cardRadioGroup_disabled-bg-checked | var(--semi-color-primary-light-default) | 卡片样式单选选中且禁用时的背景色 |
| $color-radio_cardRadioGroup_disabled-bg-active | transparent | 卡片样式单选禁用时的背景色 - 按下态 |
| $color-radio_cardRadioGroup-bg-hover | var(--semi-color-fill-0) | 卡片样式单选悬浮态背景色 |
| $color-radio_cardRadioGroup-bg-active | var(--semi-color-fill-1) | 卡片样式单选按下态背景色 |
| $color-radio_cardRadioGroup_border-default | transparent | 卡片样式单选默认描边颜色 |
| $color-radio_cardRadioGroup_border-active | var(--semi-color-primary) | 卡片样式单选选中态描边颜色 |
| $color-radio_cardRadioGroup_checked_border-active | var(--semi-color-primary-active) | 卡片样式单选选中态描边颜色 - 按下态 |
| $color-radio_cardRadioGroup_checked_border-hover | var(--semi-color-primary-hover) | 卡片样式单选选中态描边颜色 - 悬浮态 |
| $color-radio_cardRadioGroup_border_disabled-active | var(--semi-color-primary-disabled) | 卡片样式单选选中且禁用时的描边颜色 |
| $color-radio_cardRadioGroup_addon-text-default | var(--semi-color-text-0) | 卡片样式单选标题文字颜色 |
| $color-radio_cardRadioGroup_extra-text-default | var(--semi-color-text-2) | 卡片样式单选辅助文字颜色 |
| $color-radio_cardRadioGroup_checked_disabled-border-default | var(--semi-color-primary-disabled) | 卡片样式选中项禁用态描边颜色 - 默认态 |
| $color-radio_cardRadioGroup_checked_disabled-border-hover | var(--semi-color-primary-disabled) | 卡片样式选中项禁用态描边颜色 - 悬浮态 |
| $color-radio_card-bg-hover | var(--semi-color-white) | 卡片模式下单选圆圈背景颜色 - 悬浮态 |
| $color-radio_card-bg-active | var(--semi-color-white) | 卡片模式下单选圆圈背景颜色 - 按下态 |
| $color-radio_card-bg-default | var(--semi-color-white) | 卡片模式下单选圆圈背景颜色 - 默认态 |
| $color-radio_primary-outline-focus | $color-focus-ring | 轮廓颜色 - 按键聚焦 |
| $radius-radio_cardRadioGroup | var(--semi-border-radius-small) | 卡片式单选圆角大小 |
| $radius-radio_addon_buttonRadio | var(--semi-border-radius-small) | 按钮式单选圆点圆角大小 |
| $radius-radio_buttonRadio | var(--semi-border-radius-small) | 按钮式单选圆角大小 |
| $width-radio_cardRadioGroup_checked-border | 1px | 卡片式单选描边宽度 |
| $width-radio_cardRadioGroup_checked_disabled-border | 1px | 卡片式单选选中且禁用时的描边宽度 |
| $width-radio_hover-border | $border-thickness-control | 描边宽度 - 悬浮态 |
| $width-radio_disabled-border | $border-thickness-control | 描边宽度 - 禁用态 |
| $width-radio_innder-border | $border-thickness-control | 描边宽度 - 禁用态 |
| $width-radio-outline | $width-focus-ring | 单选框轮廓宽度 |
| $height-radio_inner_min | 20px | 单选按钮高度 |
| $width-radio_inner | $width-icon-medium | 单选按钮宽度 |
| $spacing-radio_addon-paddingLeft | $spacing-tight | 单选标题到单选按钮左侧边距 |
| $spacing-radio_addon_buttonRadio_large-paddingX | $spacing-loose | 大尺寸按钮式单选按钮水平内边距 |
| $spacing-radio_addon_buttonRadio_large-paddingY | $spacing-base-tight * 0.5 | 大尺寸按钮式单选按钮垂直内边距 |
| $spacing-radio_addon_buttonRadio_small-paddingX | $spacing-base | 小尺寸按钮式单选按钮水平内边距 |
| $spacing-radio_addon_buttonRadio_small-paddingY | $spacing-super-tight | 中尺寸按钮式单选按钮垂直内边距 |
| $spacing-radio_addon_buttonRadio_middle-paddingX | $spacing-base | 中尺寸按钮式单选按钮水平内边距 |
| $spacing-radio_addon_buttonRadio_middle-paddingY | $spacing-extra-tight | 中尺寸按钮式单选按钮垂直内边距 |
| $spacing-radio_content-rowGap | 4px | 内容行间距 |
| $spacing-radio_group_vertical-marginBottom | $spacing-base-tight | 垂直布局单选框组底部外边距 |
| $spacing-radio_group_horizontal-marginRight | $spacing-base | 水平单选框组右侧外边距 |
| $spacing-radio_buttonRadio-padding | $spacing-extra-tight | 按钮式单选内边距 |
| $spacing-radio_buttonRadioGroup_small-paddingX | $spacing-super-tight | 小尺寸按钮式单选组水平内边距 |
| $spacing-radio_buttonRadioGroup_small-paddingY | $spacing-extra-tight | 小尺寸按钮式单选组垂直内边距 |
| $spacing-radio_buttonRadioGroup_middle-padding | $spacing-extra-tight | 中尺寸按钮式单选组内边距 |
| $spacing-radio_buttonRadioGroup_large-padding | $spacing-extra-tight | 大尺寸按钮式单选组内边距 |
| $spacing-radio_buttonRadioGroup-paddingRight | $spacing-none | 中尺寸按钮式单选组右侧内边距 |
| $spacing-radio_cardRadioGroup-paddingX | $spacing-base | 卡片式单选组水平内边距 |
| $spacing-radio_cardRadioGroup-paddingY | $spacing-base-tight | 卡片式单选组垂直内边距 |
| $font-radio_buttonRadio_large-default-size | $font-size-regular | 大尺寸按钮式单选标题字体大小 |
| $font-radio_buttonRadio_small-default-size | $font-size-small | 中尺寸按钮式单选标题字体大小 |
| $font-radio_buttonRadio_middle-default-size | $font-size-small | 小尺寸按钮式单选标题字体大小 |
| $font-radio_buttonRadio-default-fontWeight | $font-weight-bold | 按钮式单选标题字重 - 默认态 |
| $font-radio_buttonRadio-hover-fontWeight | $font-weight-bold | 按钮式单选标题字重 - 悬浮态 |
| $font-radio_buttonRadio-checked-fontWeight | $font-weight-bold | 按钮式单选标题字重 - 选中态 |
| $font-radio_buttonRadioGroup_small-lineHeight | 16px | 小尺寸按钮式单选标题行高 |
| $font-radio_buttonRadioGroup_middle-lineHeight | 16px | 中尺寸按钮式单选标题行高 |
| $font-radio_buttonRadioGroup_large-lineHeight | 20px | 大尺寸按钮式单选标题行高 |
| $font-radio_cardRadioGroup_addon-size | $font-size-regular | 卡片式单选组标题字体大小 |
| $font-radio_cardRadioGroup_addon-fontWeight | $font-weight-bold | 卡片式单选组标题字体大小 |
| $font-radio_cardRadioGroup_addon-lineHeight | 20px | 卡片式单选组标题行高 |
| $font-radio_cardRadioGroup_extra-size | $font-size-regular | 卡片式单选组副标题字体大小 |
| $font-radio_cardRadioGroup_extra-fontWeight | normal | 卡片式单选组副标题字重 |
| $font-radio_cardRadioGroup_extra-lineHeight | 20px | 卡片式单选组副标题行高 |