<!-- Generated by scripts/gen-docs.mts from the JSDoc in registry/. Do not edit; run `pnpm run docs`. -->

# MenuRadioGroup

One choice of several in a `Menu`, such as a sort order: its `MenuRadioItem`s show a mark on the chosen one, and choosing keeps the menu open.

```tsx
import { MenuRadioGroup } from "@/components/ouro/menu/menu";
```

## Example

```tsx
<MenuRadioGroup label="Sort by" value={sort} onValueChange={setSort}>
  <MenuRadioItem value="name">Name</MenuRadioItem>
  <MenuRadioItem value="date">Date added</MenuRadioItem>
</MenuRadioGroup>
```

## Use instead when

- Use `MenuCheckboxItem` instead for settings that are each on or off, and `RadioGroup` for a choice on the page.

## Props

Type: `MenuRadioGroupProps`.

| Prop | Type | Description |
| --- | --- | --- |
| `children` (required) | `ReactNode` | The `MenuRadioItem`s. |
| `defaultValue` | `string` | The value chosen at first, uncontrolled. |
| `label` | `string` | Names the group, shown above it: "Sort by". |
| `onValueChange` | `((value: string) => void)` | Called with the value of the item chosen. |
| `value` | `string` | The chosen value, to control it; pass `onValueChange` with it. |
