> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/gradio-app/gradio/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkbox

> Create checkbox input components in Gradio

The Checkbox component creates a boolean toggle that can be checked or unchecked.

## Basic usage

```python theme={null}
import gradio as gr

def toggle_message(checked):
    return "Checked!" if checked else "Unchecked"

gr.Interface(
    fn=toggle_message,
    inputs=gr.Checkbox(),
    outputs=gr.Textbox()
).launch()
```

## Constructor

<ParamField path="value" type="bool | Callable" default="False">
  Whether checkbox is checked by default
</ParamField>

<ParamField path="label" type="str | None" default="None">
  Label displayed to the right of checkbox
</ParamField>

<ParamField path="info" type="str | None" default="None">
  Additional info text. Supports markdown/HTML
</ParamField>

<ParamField path="interactive" type="bool | None" default="None">
  Whether checkbox can be toggled
</ParamField>

## Events

* **change** - Triggered when checkbox state changes
* **input** - Triggered when checkbox is clicked
* **select** - Triggered when checkbox is selected

## Example

```python theme={null}
import gradio as gr

def process_with_option(text, include_caps):
    return text.upper() if include_caps else text

with gr.Blocks() as demo:
    text_input = gr.Textbox(label="Enter text")
    caps_check = gr.Checkbox(label="Convert to uppercase", value=False)
    output = gr.Textbox(label="Result")
    
    text_input.change(
        fn=process_with_option,
        inputs=[text_input, caps_check],
        outputs=output
    )
    caps_check.change(
        fn=process_with_option,
        inputs=[text_input, caps_check],
        outputs=output
    )
    
demo.launch()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.