CheckboxDefaults


Defaults used in Checkbox and TriStateCheckbox.

Summary

Public functions

CheckboxColors
@Composable
colors(
    checkedColor: Color,
    uncheckedColor: Color,
    checkmarkColor: Color,
    disabledColor: Color,
    disabledIndeterminateColor: Color
)

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

Cmn

Public functions

colors

@Composable
fun colors(
    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.