# CheckboxDefaults

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Checkbox.kt+class:androidx.compose.material.CheckboxDefaults) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  object CheckboxDefaults
  ```

*** ** * ** ***

Defaults used in `https://developer.android.com/reference/kotlin/androidx/compose/material/Checkbox.composable#Checkbox(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.CheckboxColors)` and `https://developer.android.com/reference/kotlin/androidx/compose/material/TriStateCheckbox.composable#TriStateCheckbox(androidx.compose.ui.state.ToggleableState,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.CheckboxColors)`.

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material/CheckboxColors` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/CheckboxDefaults#colors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( checkedColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, uncheckedColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkmarkColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledIndeterminateColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/material/CheckboxColors` that will animate between the provided colors according to the Material specification. | Cmn |

## Public functions

### colors

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0)

```
@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 `https://developer.android.com/reference/kotlin/androidx/compose/material/CheckboxColors` that will animate between the provided colors according to the Material specification.

| Parameters |
|---|---|
| `checkedColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.secondary` | the color that will be used for the border and box when checked |
| `uncheckedColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f)` | color that will be used for the border when unchecked |
| `checkmarkColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.surface` | color that will be used for the checkmark when checked |
| `disabledColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled)` | color that will be used for the box and border when disabled |
| `disabledIndeterminateColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = checkedColor.copy(alpha = ContentAlpha.disabled)` | color that will be used for the box and border in a `https://developer.android.com/reference/kotlin/androidx/compose/material/TriStateCheckbox.composable#TriStateCheckbox(androidx.compose.ui.state.ToggleableState,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.CheckboxColors)` when disabled AND in an `https://developer.android.com/reference/kotlin/androidx/compose/ui/state/ToggleableState#Indeterminate` state. |