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

# Radio

> Create radio button selection components in Gradio

The Radio component creates a set of radio buttons where only one option can be selected.

## Basic usage

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

def respond(choice):
    return f"You selected: {choice}"

gr.Interface(
    fn=respond,
    inputs=gr.Radio(["Option 1", "Option 2", "Option 3"]),
    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="str | int | float | Callable | None" default="None">
  Default selected option. If None, no option is selected initially
</ParamField>

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

  * `"value"` - Returns selected value
  * `"index"` - Returns selected index
</ParamField>

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

<ParamField path="rtl" type="bool" default="False">
  Whether to display radio buttons right-to-left
</ParamField>

## Events

* **select** - Triggered when option is selected
* **change** - Triggered when selection changes
* **input** - Triggered on input

## Example

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

gr.Radio(
    choices=[
        ("Low (128x128)", "low"),
        ("Medium (256x256)", "medium"),
        ("High (512x512)", "high")
    ],
    value="medium",
    label="Resolution"
)
```


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