生态产品多个设计器现已发布正式版

查看生态总览
跳转到内容

CheckboxGroup 复选框组 ​

从一组选项中选择任意多项。

用法 ​

从一组选项中选择任意多项

通知方式

组件结构 ​

加粗的是必需部件。

data-scope="checkbox-group":root · label · item · indicator · item-text · item-description · hidden-input · select-all-trigger

示例 ​

全选与半选 ​

使用 itemValues 计算全选和半选状态

通知方式

横向排布 ​

使用 orientation 设置排列方向

通知渠道

禁用与只读 ​

禁用项不可操作,只读项仍可聚焦

整组禁用
整组只读
单项禁用

尺寸 ​

size 决定方框与条目文字的几何档位,组标题不随档

sm
md
lg

卡片 ​

variant="card" 把每个选项画成一张可点的卡;collection 里的 description 铺成文案下方的说明行

通知方式

限定选择数 ​

min / max 约束选中数:选满时没选的项置灰,降到下限时已选的项摘不掉

擅长方向(选 1 到 2 项)已选 1 项

设计指引 ​

何时使用 ​

  • 用于偏好设置、筛选条件和批量选择。
  • 选项之间要靠一两句说明才分得清(通知渠道、附加服务)时,用 variant="card" 把每个选项画成一张卡。

何时不用 ​

特性 ​

  • collection 提供选项文本与禁用状态。
  • 不写结构时按标准结构铺出整套部件(Vue 不写默认插槽、React 不给 children、Web Components 不写部件或只写 root),三端出自同一个结构函数:label 给标题文字,每个条目带表单影子、方框、文字与说明;全选格要用时手写结构。Web Components 里标题与条目文字可以写在宿主的直接子节点上接管:slot="label"、slot="item:<值>"。
  • 全选触发器自动计算全选与半选状态。
  • min / max 约束选中数:选满 max 时没选的条目报 aria-disabled 并置灰、点不动,降到 min 时已选的条目摘不掉;全选只补到 max 为止,已满时再按是全不选(仍保住 min)。被下限锁住的已选项照常随表单提交。约束只落在用户的点选与全选上,程序化的 setValue 与初值原样落地;min 大于 max 或不是非负整数时立即报错。插槽载荷与元素上的 atMax / atMin 报此刻是否顶到了上下限。
  • orientation 设置横向或纵向排列。
  • 方框是字段家族的控制盒:不填底、描边与无影,勾中后以语气色填充;整行接 Action Control row 档,悬停 / 按下换面不缩放,方框随行换到承载面阶梯的下一档。
  • variant 是结构形态:缺省 list 是一列「方框 + 文案」的行;card 把每个条目画成一张可点的描边卡(surface 圆角,白底承载阶梯悬停 100 → 按下 200),方框在卡的行首,整张卡是命中区。勾中的卡换品牌淡底(写了 tone 换语气淡底),与表格选中行、穿梭框选中项同一种标记,描边不换;只读时卡片不给悬停与按下面。竖排时卡片撑满一列,横排时各卡等分一行、放不下就折行。全选触发器在两种形态里都是一行。
  • item-description 是文案下方的说明行(13 / --xh-fg-muted),与文案一起构成条目的可及名;collection 里的 description 会自动铺出这一行。
  • 根是 role=group,label 部件真渲染了时才经 aria-labelledby 给组命名;不写标题时给根节点写 aria-label。Vue / React 的 label 属性不论手写选项还是数据驱动都会铺出标题。
  • 值可以是任意类型:value、defaultValue、itemValues 与 collection 里交进来数字、对象都行,onValueChange、v-model、插槽与 renderItem 拿到的是原值;Vue 与 React 按 value 或 collection 推断值的类型,几处对不上、valueKey 写错字段编译即报错。数字转成字符串当键,对象值给 valueKey(字段名或取值函数),同一个选项每次都是新对象(接口刚取回来)也认得出来,不给按对象身份认;键也是条目的 data-value与随表单提交的值。Vue 的 h() 推断不了泛型,那里按宽松的类型检查;Web Components 经 property 交值,写 querySelector<XhCheckboxGroupElement<number>>("xh-checkbox-group") 收窄。

组合 ​

  • 每一项都是一个复选框,全选触发器是组内额外的一项,半选状态由组计算。
  • 在表单中以整组的值数组作为一个字段参与校验与提交。
  • 直接放进表单字段即可:字段的标题并进组名、说明进描述链,读屏进组时一起念出。

最佳实践 ​

  • 使用简短、互不重叠的选项标签。
  • 保持选项顺序稳定。
  • 设了 min / max 就在标题或说明里写明范围(「选 1 到 2 项」),置灰的条目不会自己解释为什么点不动。
  • 卡片里只放一两句说明,不放按钮、链接等第二个可点目标:整张卡是一次勾选,内嵌的动作会与勾选抢同一次点击。

反模式 ​

  • 用复选框组表达互斥选项。
  • 将全选项放在列表末尾。

API 参考 ​

产物 ​

层值
自定义元素<xh-checkbox-group>
Vue 组件XhCheckboxGroupIndicator XhCheckboxGroupItem XhCheckboxGroupItemDescription XhCheckboxGroupItemText XhCheckboxGroupLabel XhCheckboxGroupRoot XhCheckboxGroupSelectAllTrigger
组合式函数useCheckboxGroup
状态机checkboxGroupMachine
皮肤@xihan-ui/styles/checkbox-group.css

Props ​

属性类型必填说明
collectionCheckboxGroupNode<V>[]条目数据,显示文本与禁用的事实源。提供后条目部件只需声明 value。 未提供时回到文本与禁用都写在条目部件上的方式。
valueKeySelectionValueKey<V>对象值怎样取键:字段名或取值函数。同一个选项每次都是新对象(接口刚取回来)时给它; 不给时按对象身份认。值不是对象时用不着。键也是条目的 data-value 与随表单提交的值。
valueV[]选中值集合。提供即受控:cell 直读 prop,写入只发 onValueChange 不落内部值。
defaultValueV[]
itemValuesV[]组内全部条目的值,按书写顺序声明;未提供时 checkedState 退化为 unchecked / indeterminate 两态。
minnumber至少选几项,非负整数;选中数降到它时已选的条目改不动(aria-disabled)。 只约束用户的点选与全选,不校验程序化写入与初值。
maxnumber至多选几项,非负整数;选中数到了它时未选的条目改不动(aria-disabled),全选只补到它为止。 只约束用户的点选与全选,不校验程序化写入与初值。min 大于 max 立即报错。
disabledboolean整组禁用:每一项随之禁用,且隐藏输入不参与提交。
readOnlyboolean只读:仍可聚焦与朗读,但用户不可修改。
invalidboolean校验失败标注,写入每个条目的 aria-invalid。
requiredboolean必填:至少选一项。根与标题写 data-required(标题据此画星号);一项都没选时每份表单影子带原生 required, 拦下空表单的提交,选了任何一项就都撤掉。影子是 inert 的、不可聚焦,浏览器的校验气泡落不到它上面, 提交照样被拦下,错误文案交给字段给出。组根是 role=group,不收 aria-required; 条目的 aria-required 说的是「这一项必须勾上」,也不对,读屏经字段的描述链得知必填。
namestring表单字段名;提供后每个条目的隐藏输入才带 name,同名多值一并提交。
orientationOrientation视觉排布,默认 vertical。只输出 data-orientation,不输出 aria-orientation。
toneTone语气:brand / neutral / success / warning / danger / info,决定勾选方框使用哪族颜色。
sizeSize尺寸:sm / md / lg,决定方框与文字的几何档位。
variantCheckboxGroupVariant结构形态,默认 list;card 把每个条目画成一张可点的卡。
labelledboolean作者渲染了 label 部件时置真,由适配器统计而不是判断标题文字是否有值。 为假时根不输出 aria-labelledby:指向未渲染的 id 会让组没有名字,作者写在根上的 aria-label 也会被它压住。
ariaLabelstring不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上。 放进字段(字段接线)或渲染了 label 部件时名字以它们为准,aria-labelledby 盖过它。
onValueChange(details: CheckboxGroupValueChangeDetails<V>) => voidvalue 变化意图回调;受控时是唯一出口,非受控时随内部写入一并通知。

CheckboxGroupNode ​

collection 的元素。

字段类型必填说明
valueV是
labelstring展示文本;默认回退为值(不是字符串的值退回它的键)。
descriptionstring说明文字,写入 item-description 部件;未提供时本条不铺该部件。
disabledboolean条目禁用:仍可聚焦、仍占一个 Tab 停靠点,但不可修改,全选也跳过它。

事件 ​

自定义元素将载荷放在 detail;Vue 使用同名 emit。

事件载荷说明
value-changeCheckboxGroupValueChangeDetails选中值变化;detail 为 { value: 值[] },值是 value / collection 里交进来的原值(字符串、数字或对象)

插槽 ​

仅列出带载荷的插槽。

Vue 组件插槽载荷说明
XhCheckboxGroupRootdefaultCheckboxGroupRootSlotProps<V>
XhCheckboxGroupRootlabel—
XhCheckboxGroupRootitemCheckboxGroupNodeMeta<V>

React 适配器 props ​

只列各组件自己声明的那些:继承自 ComponentPropsWithRef 的 DOM 属性不在其中,根组件上与上面 Props 表同名的也不重复列。Vue 的对应物是上面的插槽表。

React 组件属性类型必填说明
XhCheckboxGroupItemvalueunknown是条目代表的值,与根上的值同类型:字符串、数字或对象。
XhCheckboxGroupItemdisabledboolean默认交给 connect 查询 collection,写死 false 会覆盖数据中的禁用。
XhCheckboxGroupRootlabelReactNode标题文字。提供后不必再写 label 部件。
XhCheckboxGroupRootrenderItem(node: CheckboxGroupNodeMeta<V>) => ReactNode每个条目的自定义内容;未提供时使用 collection 中的 label。
XhCheckboxGroupRootchildrenSlotChildren<CheckboxGroupRootSlotProps<V>>

状态 ​

公开状态写入 data-state。

部件取值
item'checked' | 'unchecked'
indicator'checked' | 'unchecked'
item-text'checked' | 'unchecked'
item-description'checked' | 'unchecked'
hidden-input'checked' | 'unchecked'
select-all-triggerresolveCheckedState(value, prop('itemValues') ?? [])

以下名称仅用于内部状态机。

状态:idle

事件:VALUE.SET · ITEM.TOGGLE · ALL.TOGGLE · FORM.RESET · PRESS.START · PRESS.END

判据:editable · canPress

connect API ​

getXxxProps() 返回对应部件的宿主属性。

成员类型说明
valueV[]
collectionreadonly CheckboxGroupNodeMeta<V>[]由 collection 推导的条目元信息,按数据顺序排列;未提供 collection 时为空数组。
checkedStateCheckboxGroupCheckedState
disabledboolean
readOnlyboolean
invalidboolean
requiredboolean
atMaxboolean选中数到了 max:未选的条目改不动。未设 max 时恒为 false。
atMinboolean选中数降到 min:已选的条目改不动。未设 min(或为 0)时恒为 false。
isChecked(value: V) => boolean
setValue(next: V[]) => void整体替换选中集合。程序化入口,不受 readOnly 拦截。
toggleValue(value: V) => void切换某个值;整组禁用或只读时无效。
getRootProps() => T['element']
getLabelProps() => T['element']
getItemProps(props: CheckboxGroupItemProps<V>) => T['element']
getIndicatorProps(props: CheckboxGroupItemProps<V>) => T['element']
getItemTextProps(props: CheckboxGroupItemProps<V>) => T['element']
getItemDescriptionProps(props: CheckboxGroupItemProps<V>) => T['element']条目的说明:文案下方一行次级文字,常用在 card 形态里。
getHiddenInputProps(props: CheckboxGroupItemProps<V>) => T['input']条目的表单影子:一份视觉隐藏的原生 checkbox,由条目内部渲染。
getSelectAllTriggerProps() => T['element']全选 / 半选的父复选框。必须写在 root 之内,它依靠祖先链找到本组。

无障碍 ​

键盘 ​

规格出处:W3C APG

按键生效条件行为
Tab / Shift+Tabfocus enters or leaves the group组内有几个条目就有几个 Tab 停靠点(禁用条目也留一个),容器自己不占位;单选组的"整组一个停靠点"在这里不成立
Spacefocus on item, group editable and item not disabled翻转该条目的选中态;改不动时放行按键给页面滚动
Spacefocus on select-all-trigger, group editable可用条目未全选则一并勾上,已全选则一并取消;禁用条目不受影响
Spaceheld on item / select-all-trigger, group editable and item not disabled按住期间该行投影 data-pressed,与指针 :active 同一副按压面(行换面、方框随行换底,不缩放);抬起或失焦撤下,按住途中整组转入禁用或只读也撤下。role=checkbox 只有 Space 是激活键,Enter 不进按压面;选中与按压互相独立

ARIA ​

以下属性由 connect 生成。

部件属性值
rootaria-labelprops.ariaLabel
rootaria-labelledbylabel 部件的 id | undefined
rootrole'group'
itemaria-checked'true' | 'false'
itemaria-disabled'true' | 'false'
itemaria-invalid'true' | 'false'
itemaria-readonly'true' | 'false'
itemrole'checkbox'
indicatoraria-hidden'true'
hidden-inputaria-hidden'true'
select-all-triggeraria-checked'true' | 'mixed' | 'false'
select-all-triggeraria-disabled'false' | 'true'
select-all-triggeraria-labelledbylabel 部件的 id select-all-trigger 部件的 id | select-all-trigger 部件的 id
select-all-triggeraria-readonly'true' | 'false'
select-all-triggerrole'checkbox'

样式参考 ​

皮肤 ​

@xihan-ui/styles/checkbox-group.css 按 [data-scope="checkbox-group"][data-part="root"] 部件选择器书写,发布产物以挂载类 .xh-scope-checkbox-group 代替其中的 data-scope(特异性相同),位于 xihan.components 层。覆盖样式使用 xihan.overrides,部件选择器照常可用。

forced-colors: active 下另有一套规则:颜色交给系统,边框与状态标记改用系统色关键字。

数据属性 ​

由 connect 生成;条件不成立时不输出无值属性。

部件属性值
rootdata-disabled''(条件成立时才出现)
rootdata-invalid''(条件成立时才出现)
rootdata-orientationprops.orientation
rootdata-readonly''(条件成立时才出现)
rootdata-required''(条件成立时才出现)
rootdata-sizeprops.size
rootdata-toneprops.tone
rootdata-variantprops.variant
labeldata-required''(条件成立时才出现)
itemdata-disabled''(条件成立时才出现)
itemdata-pressed''(条件成立时才出现)
itemdata-readonly''(条件成立时才出现)
itemdata-state'checked' | 'unchecked'
itemdata-xh-action-control''
itemdata-xh-action-display'always'
itemdata-xh-action-profile'row'
itemdata-xh-action-size'xs'
itemdata-xh-action-variant'outline' | 'ghost'
itemdata-xh-choice-card''(条件成立时才出现)
indicatordata-disabled''(条件成立时才出现)
indicatordata-state'checked' | 'unchecked'
indicatordata-xh-check-mark'checked' | 'unchecked'
indicatordata-xh-check-mark-profile'box'
item-textdata-disabled''(条件成立时才出现)
item-textdata-state'checked' | 'unchecked'
item-descriptiondata-disabled''(条件成立时才出现)
item-descriptiondata-state'checked' | 'unchecked'
hidden-inputdata-disabled''(条件成立时才出现)
hidden-inputdata-state'checked' | 'unchecked'
select-all-triggerdata-disabled''(条件成立时才出现)
select-all-triggerdata-pressed''(条件成立时才出现)
select-all-triggerdata-readonly''(条件成立时才出现)
select-all-triggerdata-stateresolveCheckedState(value, prop('itemValues') ?? [])
select-all-triggerdata-xh-action-control''
select-all-triggerdata-xh-action-display'always'
select-all-triggerdata-xh-action-profile'row'
select-all-triggerdata-xh-action-size'xs'
select-all-triggerdata-xh-action-variant'ghost'
select-all-triggerdata-xh-check-markresolveCheckedState(value, prop('itemValues') ?? [])
select-all-triggerdata-xh-check-mark-profile'row'

CSS 变量 ​

本组件公开覆盖槽由独立皮肤的实际消费位生成;默认来源、作用部件和状态均与 CSS 同源。

变量部件CSS 属性状态默认来源说明
--xh-checkbox-group-card-title-font-weightitem
item-text
font-weightxh-choice-card--xh-text-label-weightcheckbox-group 的 item、item-text 部件 font-weight 覆盖槽。
--xh-checkbox-group-gaprootgapdefault--xh-space-2checkbox-group 的 root 部件 gap 覆盖槽。
--xh-checkbox-group-icon-sizeroot--xh-icon-sizedefault--xh-_checkbox-group-glyphcheckbox-group 的 root 部件 --xh-icon-size 覆盖槽。
--xh-checkbox-group-indicator-bgindicator
root
select-all-trigger
background-colordefaulttransparentcheckbox-group 的 indicator、root、select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-indicator-bg-checkedindicator
select-all-trigger
background-coloris([data-state='checked'], [data-state='indeterminate'])
state=checked
state=indeterminate
--xh-_checkbox-group-accentcheckbox-group 的 indicator、select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-indicator-bg-checked-pressedindicator
item
root
select-all-trigger
background-colordisabled
is(:active, [data-pressed])
is([data-state='checked'], [data-state='indeterminate'])
not([data-disabled])
not([data-readonly])
pressed
readonly
state=checked
state=indeterminate
--xh-_tone-activecheckbox-group 的 indicator、item、root、select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-indicator-bg-disabledindicator
item
root
select-all-trigger
background-colordisabled--xh-bg-subtlecheckbox-group 的 indicator、item、root、select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-indicator-bg-pressedindicator
item
root
select-all-trigger
background-colordisabled
is(:active, [data-pressed])
not([data-disabled])
not([data-readonly])
pressed
readonly
--xh-_checkbox-group-host-bg-pressedcheckbox-group 的 indicator、item、root、select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-indicator-borderindicator
select-all-trigger
borderdefault--xh-border-strongcheckbox-group 的 indicator、select-all-trigger 部件 border 覆盖槽。
--xh-checkbox-group-indicator-border-checkedindicator
select-all-trigger
border-coloris([data-state='checked'], [data-state='indeterminate'])
state=checked
state=indeterminate
--xh-_checkbox-group-accentcheckbox-group 的 indicator、select-all-trigger 部件 border-color 覆盖槽。
--xh-checkbox-group-indicator-border-disabledindicator
item
root
select-all-trigger
border-colordisabled--xh-border-defaultcheckbox-group 的 indicator、item、root、select-all-trigger 部件 border-color 覆盖槽。
--xh-checkbox-group-indicator-border-hoverindicator
item
root
select-all-trigger
border-color@media (hover: hover)
disabled
hover
invalid
not([data-disabled])
not([data-invalid])
not([data-readonly])
not([data-state='checked'])
not([data-state='indeterminate'])
readonly
state=checked
state=indeterminate
--xh-border-control-hovercheckbox-group 的 indicator、item、root、select-all-trigger 部件 border-color 覆盖槽。
--xh-checkbox-group-indicator-border-invalidindicator
root
border-colorinvalid--xh-border-invalidcheckbox-group 的 indicator、root 部件 border-color 覆盖槽。
--xh-checkbox-group-indicator-fgindicator
select-all-trigger
--xh-check-mark-fg
color
default--xh-_checkbox-group-on-accentcheckbox-group 的 indicator、select-all-trigger 部件 --xh-check-mark-fg、color 覆盖槽。
--xh-checkbox-group-indicator-fg-disabledindicator
item
root
select-all-trigger
--xh-check-mark-fg
color
disabled--xh-fg-disabledcheckbox-group 的 indicator、item、root、select-all-trigger 部件 --xh-check-mark-fg、color 覆盖槽。
--xh-checkbox-group-indicator-font-sizeindicator
select-all-trigger
font-sizedefault--xh-_checkbox-group-glyphcheckbox-group 的 indicator、select-all-trigger 部件 font-size 覆盖槽。
--xh-checkbox-group-indicator-radiusindicator
select-all-trigger
border-radiusdefault--xh-shape-insetcheckbox-group 的 indicator、select-all-trigger 部件 border-radius 覆盖槽。
--xh-checkbox-group-indicator-shadowindicator
select-all-trigger
box-shadowdefaultnonecheckbox-group 的 indicator、select-all-trigger 部件 box-shadow 覆盖槽。
--xh-checkbox-group-indicator-sizeindicator
select-all-trigger
--xh-check-mark-box-size
block-size
inline-size
default--xh-_checkbox-group-boxcheckbox-group 的 indicator、select-all-trigger 部件 --xh-check-mark-box-size、block-size、inline-size 覆盖槽。
--xh-checkbox-group-item-bg-hoveritembackground-colordisabled
hover
loading
not([data-disabled])
not([data-loading])
--xh-bg-subtlecheckbox-group 的 item 部件 background-color 覆盖槽。
--xh-checkbox-group-item-bg-presseditembackground-colordisabled
is(:active, [data-pressed])
loading
not([data-disabled])
not([data-loading])
pressed
--xh-bg-subtle-hovercheckbox-group 的 item 部件 background-color 覆盖槽。
--xh-checkbox-group-item-description-fgitem-descriptioncolordefault--xh-fg-mutedcheckbox-group 的 item-description 部件 color 覆盖槽。
--xh-checkbox-group-item-description-fg-disableditem
item-description
colordisabled--xh-fg-disabledcheckbox-group 的 item、item-description 部件 color 覆盖槽。
--xh-checkbox-group-item-description-font-sizeitem-descriptionfont-sizedefault--xh-text-secondary-sizecheckbox-group 的 item-description 部件 font-size 覆盖槽。
--xh-checkbox-group-item-fgitemcolordefault
disabled
focus-visible
hover
is(:active, [data-pressed])
loading
not([data-disabled])
not([data-loading])
pressed
--xh-fg-defaultcheckbox-group 的 item 部件 color 覆盖槽。
--xh-checkbox-group-item-fg-disableditemcolordisabled--xh-fg-disabledcheckbox-group 的 item 部件 color 覆盖槽。
--xh-checkbox-group-item-font-sizeitemfont-sizedefault--xh-_checkbox-group-font-sizecheckbox-group 的 item 部件 font-size 覆盖槽。
--xh-checkbox-group-item-gapitemgapdefault--xh-_checkbox-group-gapcheckbox-group 的 item 部件 gap 覆盖槽。
--xh-checkbox-group-item-radiusitemborder-radiusdefault--xh-shape-controlcheckbox-group 的 item 部件 border-radius 覆盖槽。
--xh-checkbox-group-item-row-gapitemrow-gaphas(> [data-scope='checkbox-group'][data-part='item-description'])
not([data-xh-choice-card])
xh-choice-card
--xh-space-1checkbox-group 的 item 部件 row-gap 覆盖槽。
--xh-checkbox-group-label-fglabelcolordefault--xh-fg-mutedcheckbox-group 的 label 部件 color 覆盖槽。
--xh-checkbox-group-label-fg-disabledlabel
root
colordisabled--xh-fg-subtlecheckbox-group 的 label、root 部件 color 覆盖槽。
--xh-checkbox-group-label-font-sizelabelfont-sizedefault--xh-text-label-sizecheckbox-group 的 label 部件 font-size 覆盖槽。
--xh-checkbox-group-label-font-weightlabelfont-weightdefault--xh-text-label-weightcheckbox-group 的 label 部件 font-weight 覆盖槽。
--xh-checkbox-group-select-all-trigger-bg-hoverselect-all-triggerbackground-colordisabled
hover
loading
not([data-disabled])
not([data-loading])
--xh-bg-subtlecheckbox-group 的 select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-select-all-trigger-bg-pressedselect-all-triggerbackground-colordisabled
is(:active, [data-pressed])
loading
not([data-disabled])
not([data-loading])
pressed
--xh-bg-subtle-hovercheckbox-group 的 select-all-trigger 部件 background-color 覆盖槽。
--xh-checkbox-group-select-all-trigger-fgselect-all-triggercolordefault
disabled
focus-visible
hover
is(:active, [data-pressed])
loading
not([data-disabled])
not([data-loading])
pressed
--xh-fg-defaultcheckbox-group 的 select-all-trigger 部件 color 覆盖槽。
--xh-checkbox-group-select-all-trigger-fg-disabledselect-all-triggercolordisabled--xh-fg-disabledcheckbox-group 的 select-all-trigger 部件 color 覆盖槽。
--xh-checkbox-group-select-all-trigger-font-sizeselect-all-triggerfont-sizedefault--xh-_checkbox-group-font-sizecheckbox-group 的 select-all-trigger 部件 font-size 覆盖槽。
--xh-checkbox-group-select-all-trigger-font-weightselect-all-triggerfont-weightdefault--xh-font-weight-mediumcheckbox-group 的 select-all-trigger 部件 font-weight 覆盖槽。
--xh-checkbox-group-select-all-trigger-gapselect-all-triggergapdefault--xh-_checkbox-group-gapcheckbox-group 的 select-all-trigger 部件 gap 覆盖槽。
--xh-checkbox-group-select-all-trigger-radiusselect-all-triggerborder-radiusdefault--xh-shape-insetcheckbox-group 的 select-all-trigger 部件 border-radius 覆盖槽。

动效 ​

动效角色:按压 · 状态 · 切换 · 出现(见动效规范)。

-webkit-mask-size · background-color · border-color · clip-path · mask-size · opacity 走 transition 过渡。时长与缓动读动效令牌,改令牌即改全局节奏。

系统开启减弱动效时由令牌层统一收敛,皮肤不另作判断。

响应式 ​

皮肤另按输入能力分档:hover: hover · pointer: coarse:同一份皮肤在触屏与带指针的设备上不一样,与视口宽度无关。

RTL ​

皮肤用逻辑属性排布(inline-start 一族),dir="rtl" 下自动镜像。

Released under The MIT License