> ## 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.

# CheckboxGroup

> Create checkbox group components in Gradio

The CheckboxGroup component creates a set of checkboxes for selecting multiple options.

## Basic usage

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

def show_selections(choices):
    return f"You selected: {', '.join(choices)}"

gr.Interface(
    fn=show_selections,
    inputs=gr.CheckboxGroup(["A", "B", "C"]),
    outputs=gr.Textbox()
).launch()
```

## Constructor

<ParamField path="choices" type="Sequence[str | int | float | tuple] | None" default="None">
  List of options. Can be values or (label, value) tuples
</ParamField>

<ParamField path="value" type="Sequence[str | float | int] | str | float | int | Callable | None" default="None">
  Default selected values as list, or single value
</ParamField>

<ParamField path="type" type="Literal['value', 'index']" default="'value'">
  Return type:

  * `"value"` - Returns list of selected values
  * `"index"` - Returns list of selected indices
</ParamField>

<ParamField path="label" type="str | None" default="None">
  Label displayed above component
</ParamField>

<ParamField path="show_select_all" type="bool" default="False">
  If True, shows select/deselect all checkbox
</ParamField>

## Events

* **change** - Triggered when selection changes
* **input** - Triggered on input
* **select** - Triggered when checkbox is toggled

## Example

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

gr.CheckboxGroup(
    choices=[
        ("Python", "py"),
        ("JavaScript", "js"),
        ("Java", "java")
    ],
    value=["py"],
    label="Programming languages",
    show_select_all=True
)
```


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