用于切换选项开关的基本输入元素。
¥API Reference
¥This component inherits props from the Checkbox primitive and supports common margin props.
¥Examples
¥Size
使用 size
属性控制复选框的大小。
¥Use the size
prop to control the size of the checkbox.
¥Variant
使用 variant
属性控制复选框的视觉样式。
¥Use the variant
prop to control the visual style of the checkbox.
¥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
中组合 Checkbox
,会自动将其与第一行文本居中。
¥Composing Checkbox
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.
¥Indeterminate
使用 "indeterminate"
值创建不确定的复选框。
¥Use the "indeterminate"
value to create an indeterminate checkbox.