A versatile Checkbox, managing state, context, and styling.
Anatomy
<Checkbox>
<Checkbox.Indicator />
<Checkbox.Label />
</Checkbox>Examples
Variants
Checkbox components come with three built in variants, solid, outlined, and muted.
Label Positions
The label element <label> is available in the checkbox component anatomy. If included it can be easily positioned with the position prop.
Sizes
To manage the size of the checkbox component you can provide a default or custom size through the size prop.
Colors
The checkbox component uses the color prop to allow for predefined and custom colors.
Alignments
To set alignment of the checkbox and its label content you can use the align prop.
States
Checkboxes can be given the disabled, readonly, and defaultChecked states.
Indeterminate
Checkboxes support the indeterminate state for representing a partially selected state.
High Contrast
Only available on the "solid" variant.