Checkbox
Creates a checkbox.
Parameters
Whether the checkbox is currently checked or not.
A callback which is invoked when the checkbox is toggled.
Whether the checkbox is enabled or not. If not, the checkbox will be rendered in a disabled state and will not be interactable.
The composable that renders the icon inside the checkbox. This will be passed a CheckboxIconScope which you can use to customize the icon based on potentially relevant context.
The size of the checkbox. Defaults to CheckboxSize.MD. You can implement your own CheckboxSize if you want custom sizing.
An optional spacing parameter to use between the checkbox and any content drawn to the right of it.
A color palette which, if present, controls the colors for this checkbox. If not provided, the checkbox will use the relevant colors from the silk theming Palette.
An optional override for the border color of the checkbox when unchecked.
An optional override for the background color of the checkbox when unchecked.
An optional override for the color of the icon drawn in the checkbox.
An optional override for the border color when the input is focused.
Inline content attached to the checkbox. This will be treated as an HTML label, which means when clicked it will toggle the checkbox, and screen readers will read out any text in it when the checkbox is focused.
See also
Deprecated
Rename the `colorScheme` parameter to `colorPalette`. `ColorScheme` is a legacy name that is going away.