Checkbox
Carbon Checkbox
Checkboxes are used when there are multiple items to select in a list. Users can select zero, one, or any number of items.
Content
The checkbox itself is a square box with a checkmark or an indeterminate mark.
The label describes the information the user wants to select or unselect.
The error or warning message are displayed below the checkbox and help the user understand about a certain state regarding the checkbox context.
(From Checkbox documentation)
Parameters
Whether the checkbox is checked.
The text to be displayed next to the checkbox.
Callback invoked when the checkbox is clicked.
The modifier to be applied to the checkbox.
The SelectableInteractiveState of the checkbox.
The MutableInteractionSource that keeps track of the checkbox state.
Carbon Checkbox
Checkboxes are used when there are multiple items to select in a list. Users can select zero, one, or any number of items.
Content
The checkbox itself is a square box with a checkmark or an indeterminate mark.
The label describes the information the user wants to select or unselect.
The error or warning message are displayed below the checkbox and help the user understand about a certain state regarding the checkbox context.
Interactions
The component applies a tri-state toggleable interaction to the checkbox root composable if the onClick callback is provided, meaning that the whole component is clickable in order to create a more accessible click target. Otherwise, the checkbox won't be interactable.
(From Checkbox documentation)
Parameters
The ToggleableState of the checkbox.
The text to be displayed next to the checkbox.
Callback invoked when the checkbox is clicked.
The modifier to be applied to the checkbox.
The SelectableInteractiveState of the checkbox.
The MutableInteractionSource that keeps track of the checkbox state.