# RadioGroup

Mutually exclusive choices with room to explain what each choice means.

- Family: Forms, imported from `mizu-ui` or `mizu-ui/forms`
- Docs: https://mizu.user64bit.world/components/radio-group
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/forms/Selection.tsx

## Usage

```tsx
"use client";

import { useState } from "react";
import { RadioGroup } from "mizu-ui";

export function Example() {
  const [value, setValue] = useState("local");
  return (
    <RadioGroup
      label="Storage"
      value={value}
      onValueChange={setValue}
      options={[
        { value: "local", label: "Local", description: "On this device" },
        { value: "cloud", label: "Cloud", description: "Across devices" },
      ]}
    />
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/radio-group
```

## Props

- `options`: `Choice[]`. Value, label, optional description and disabled.
- `value / onValueChange`: `string / function`. Controlled selection.
- `name`: `string`. Form field name. Unique by default.

## Accessibility

Fieldset/legend and native radios supply group semantics and arrow-key behavior.

## Motion

CSS transitions explain state changes. Reduced motion removes travel.
