---
title: CheckBoxTile
description: CheckBoxTile API.
---

import CodeSnippetMD from '@slint/common-files/src/components/CodeSnippetMD.astro';
import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';

<CodeSnippetMD imagePath="/src/assets/generated/checkboxtile.png" scale="3" imageWidth="140" imageHeight="100" imageAlt="">
```slint
import { CheckBoxTile, CheckState } from "@material";
export component Example inherits Window {
    width: 140px;
    height: 100px;
    background: transparent;
    CheckBoxTile {
        text: "Option 1";
        check-state: CheckState.checked;
    }
}
```
</CodeSnippetMD>

A `CheckBoxTile` is a control that combines a text label with a `CheckBox`. See [CheckBox](/components/checkboxes/check_box/) and [ListTile](/components/list_tile/) for more information.

## Properties

### check-state
<SlintProperty propName="check-state" typeName="enum" enumName="CheckState" propertyVisibility="in-out">
The current state of the checkbox. Can be `unchecked`, `partially-checked`, or `checked`. If the state is `partially-checked`, the tristate property is set to true.

```slint no-test "check-state: CheckState.checked;"
CheckBoxTile {
    check-state: CheckState.checked;
}
```
</SlintProperty>


### enabled
<SlintProperty propName="enabled" typeName="bool" defaultValue="true">
Whether the checkbox is enabled and can be interacted with.
</SlintProperty>

### has-error
<SlintProperty propName="has-error" typeName="bool">
Whether the checkbox should display an error state.
</SlintProperty>

### text
<SlintProperty propName="text" typeName="string">
The primary text displayed in the list tile.
</SlintProperty>

### tristate
<SlintProperty propName="tristate" typeName="bool">
Whether the checkbox supports three states (unchecked, partially checked, checked).
</SlintProperty>

## Callbacks

### checked-state-changed(check-state: CheckState)
Invoked when the checkbox state changes.

## Functions

### toggle()
Toggles the checkbox state. In tristate mode, cycles through unchecked → partially checked → checked → unchecked.