> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# RadioGroup

> Single selection from multiple options

# RadioGroup

The `RadioGroup` component allows users to select exactly one option from a set.

## Usage

```jsx theme={null}
<RadioGroup 
  name="plan" 
  options={[
    { label: "Basic", value: "basic" },
    { label: "Pro", value: "pro" }
  ]} 
  defaultValue="basic"
/>
```

## Props

<ResponseField name="options" type="array" required>
  Array of options `{ label: string, value: string }`.
</ResponseField>

<ResponseField name="name" type="string" required>
  Field name grouping the radios.
</ResponseField>

<ResponseField name="defaultValue" type="string">
  Initially selected value.
</ResponseField>

<ResponseField name="direction" type="string" default="vertical">
  Layout direction: `vertical` or `horizontal`.
</ResponseField>

## Examples

### Horizontal Options

```jsx theme={null}
<RadioGroup 
  direction="horizontal" 
  options={[
    { label: "Yes", value: "yes" },
    { label: "No", value: "no" }
  ]} 
/>
```
