Google is committed to advancing racial equity for Black communities. See how.

CheckboxConstants

object CheckboxConstants
kotlin.Any
   ↳ androidx.compose.material.CheckboxConstants

Constants used in Checkbox and TriStateCheckbox.

Summary

Public methods
CheckboxColors
defaultColors(checkedColor: Color = MaterialTheme.colors.secondary, uncheckedColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f), checkmarkColor: Color = MaterialTheme.colors.surface, disabledColor: Color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled), disabledIndeterminateColor: Color = checkedColor.copy(alpha = ContentAlpha.disabled))

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

Public methods

defaultColors

@Composable fun defaultColors(
    checkedColor: Color = MaterialTheme.colors.secondary,
    uncheckedColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f),
    checkmarkColor: Color = MaterialTheme.colors.surface,
    disabledColor: Color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled),
    disabledIndeterminateColor: Color = checkedColor.copy(alpha = ContentAlpha.disabled)
): CheckboxColors

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

Parameters
checkedColor: Color = MaterialTheme.colors.secondary the color that will be used for the border and box when checked
uncheckedColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f) color that will be used for the border when unchecked
checkmarkColor: Color = MaterialTheme.colors.surface color that will be used for the checkmark when checked
disabledColor: Color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled) color that will be used for the box and border when disabled
disabledIndeterminateColor: Color = checkedColor.copy(alpha = ContentAlpha.disabled) color that will be used for the box and border in a TriStateCheckbox when disabled AND in an ToggleableState.Indeterminate state.