<Checkbox
defaultChecked={true}
label="Click me to select!"
onChange={(e, state) => {
console.log(e, state.checked, state.value);
}}
/>
Checkbox Props
Uncontrolled check state.
Helper text description below the checkbox.
icons
{ checked?: Svg, indeterminate?: Svg, unchecked?: Svg }
Overrides for default icons.
Sets the checkbox to an indeterminate state.
The label should have accessible string content.
onChange
(e: ChangeEvent<HTMLInputElement>, state?: CheckboxState) => void
Callback when the checkbox is changed.
onClick
(e?: MouseEvent<HTMLInputElement>, state?: CheckboxState) => void
Callback when the checkbox is clicked.
<Checkbox.Group direction="column" legend="Checkbox Group">
<Checkbox label="Checkbox 1" defaultChecked />
<Checkbox label="Checkbox 2" />
<Checkbox label="Checkbox 3" />
</Checkbox.Group>
Checkbox.Group Props
legend
ReactElement | string
required
flexDirection
"column" | "row"
default:"column"
The direction that the checkboxes are organized. This is inherited from LayoutUtilProps.
Displays in a tooltip at the legend.