# Checkboxes A `CheckBox` represents a button with two states, selected and unselected. Unlike radio buttons, changes in the states of one checkbox do not usually affect other checkboxes. A checkbox is a rounded square button with a check to denote its current state. ## Design & API Documentation - [Material Design guidelines: Checkboxes](https://material.io/go/design-checkboxes) - [Class definition](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/checkbox/MaterialCheckBox.java) - [Class overview](https://developer.android.com/reference/android/widget/CheckBox) ## Usage The `MaterialCheckBox` widget provides a complete implementation of Material Design's checkbox component. It is auto-inflated when using a non-Bridge Theme.MaterialComponents.\* theme which sets the MaterialComponentsViewInflater. Example code of how to include the widget in your layout: ```xml ``` ### Material Styles Using a Material Components theme with `MaterialCheckBox` will match the color of `CheckBox` views to your theme's palette. If you want to override this behavior, as you might with a custom drawable, set the `useMaterialThemeColors` parameter to false. ```xml ``` ### Styles Use `checkboxStyle` for style changes. ```xml @style/Widget.MaterialComponents.CompoundButton.CheckBox ```