---
title: "Checkbox | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/checkbox/"
---

# Checkbox

> A simple widget that adds a checkbox.

![Selected checkbox widget.](images/checkbox.png)

## General info

- **type**: `checkbox`

## Params

 - `prompt` - a text string displaying the checkbox caption.
 - `value` or `_` - a checkbox value, whether it is checked or not (`false` if omitted). 

## Example

Let's assume you want to add a checkbox that should lock a [button](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/button.md) when it is not set. The config may appear as follows:

```json
{
    "widgets": [
        {
            "name": "unlock",
            "type": "checkbox",
            "params": {
                "prompt": "I approve the design.",
                "value": true
            }
        },
        {
            "name": "button",
            "type": "button",
            "params": {
                "text": "Finish",
                "enabled": "{{$['unlock']._}}"
            }
        }

    ]
}
```

Now, when you select the checkbox, the **Finish** button gets enabled. 

![Cleared checkbox widget.](images/check-off.png) ![Selected checkbox widget.](images/check-on.png)
