一组交互式按钮,可一次选择多个选项。
¥API Reference
此组件基于 div
元素并支持 常用边距属性。
¥This component is based on the div
element and supports common margin props.
¥Root
包含复选框组的所有部分。
¥Contains all the parts of a checkbox group.
¥Item
组中可勾选的项目。
¥An item in the group that can be checked.
¥Examples
¥Size
使用 size
属性控制复选框的大小。
¥Use the size
prop to control the checkbox size.
¥Variant
使用 variant
属性控制复选框的视觉样式。
¥Use the variant
prop to control the visual style of the checkboxes.
¥Color
使用 color
属性指定特定的 color。
¥Use the color
prop to assign a specific color.
¥High-contrast
使用 highContrast
属性增加与背景的颜色对比度。
¥Use the highContrast
prop to increase color contrast with the background.
¥Alignment
在 Text
中组合 CheckboxGroup.Item
,会自动将其与第一行文本居中。
¥Composing CheckboxGroup.Item
within Text
automatically centers it with the first line of text.
它还能自动与多行文本对齐。
¥It is automatically well-aligned with multi-line text too.
¥Disabled
使用原生 disabled
属性创建禁用的复选框。
¥Use the native disabled
attribute to create a disabled checkbox.