# Context Menu

A menu of actions for an element, opened with a right-click or a long press.

```tsx
import { CopyIcon, EyeIcon, Trash2Icon, UserPlusIcon } from "lucide-react"
import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger } from "@zenoxai/ui/components/context-menu"

function ContextMenuDemo() {
  return (
    <ContextMenu>
      <ContextMenuTrigger className="flex h-36 w-full max-w-sm items-center justify-center rounded-lg border border-dashed border-border-strong text-text-secondary">
        Right-click this alert
      </ContextMenuTrigger>
      <ContextMenuContent className="w-52">
        <ContextMenuItem>
          <EyeIcon />
          View details
        </ContextMenuItem>
        <ContextMenuItem>
          <UserPlusIcon />
          Assign to me
          <ContextMenuShortcut>A</ContextMenuShortcut>
        </ContextMenuItem>
        <ContextMenuItem>
          <CopyIcon />
          Copy alert ID
          <ContextMenuShortcut>⌘C</ContextMenuShortcut>
        </ContextMenuItem>
        <ContextMenuSeparator />
        <ContextMenuItem variant="destructive">
          <Trash2Icon />
          Delete alert
        </ContextMenuItem>
      </ContextMenuContent>
    </ContextMenu>
  )
}
```

## Usage

```tsx
import {
  ContextMenu,
  ContextMenuContent,
  ContextMenuItem,
  ContextMenuTrigger,
} from "@zenoxai/ui/components/context-menu"
```

```tsx
<ContextMenu>
  <ContextMenuTrigger>{/* the alert row, card or chart */}</ContextMenuTrigger>
  <ContextMenuContent>
    <ContextMenuItem onClick={viewDetails}>View details</ContextMenuItem>
    <ContextMenuItem onClick={assign}>Assign to me</ContextMenuItem>
  </ContextMenuContent>
</ContextMenu>
```

A context menu opens at the pointer when the user right-clicks the trigger area, or long-presses
it on a touch screen. It is a shortcut for people who know it is there: a faster way to reach
the actions of a table row, an asset card or a chart.

- Every action in a context menu must also be reachable from a visible control, usually a
  [Dropdown Menu](/components/dropdown-menu) on the same row. Keyboard users and many touch users
  never open a context menu.
- For the menus at the top of an editor or app, use [Menubar](/components/menubar).

`ContextMenuTrigger` renders a `<div>` around the area that responds to the right-click and
disables text selection inside it. The menu offers the same items as
[Dropdown Menu](/components/dropdown-menu): items with icons and shortcuts, a destructive
variant, checkbox and radio items, labels, separators and submenus.

## Examples

### Submenu

`ContextMenuSub` nests a second menu that opens to the side.

```tsx
import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "@zenoxai/ui/components/context-menu"

function ContextMenuSubmenu() {
  return (
    <ContextMenu>
      <ContextMenuTrigger className="flex h-36 w-full max-w-sm items-center justify-center rounded-lg border border-dashed border-border-strong text-text-secondary">
        Right-click srv-db-01.prod
      </ContextMenuTrigger>
      <ContextMenuContent className="w-52">
        <ContextMenuItem>Open asset</ContextMenuItem>
        <ContextMenuItem>Run vulnerability scan</ContextMenuItem>
        <ContextMenuSub>
          <ContextMenuSubTrigger>Move to tenant</ContextMenuSubTrigger>
          <ContextMenuSubContent>
            <ContextMenuItem>Acme Corp</ContextMenuItem>
            <ContextMenuItem>Globex</ContextMenuItem>
            <ContextMenuItem>Initech</ContextMenuItem>
          </ContextMenuSubContent>
        </ContextMenuSub>
        <ContextMenuSeparator />
        <ContextMenuItem variant="destructive">
          Remove from inventory
        </ContextMenuItem>
      </ContextMenuContent>
    </ContextMenu>
  )
}
```

### Checkbox and radio items

Settings of the element under the pointer, such as the display options of a chart, fit
checkbox and radio items. They keep the menu open when toggled.

```tsx
import * as React from "react"
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuTrigger } from "@zenoxai/ui/components/context-menu"

function ContextMenuSettings() {
  const [showGrid, setShowGrid] = React.useState(true)
  const [showLegend, setShowLegend] = React.useState(false)
  const [range, setRange] = React.useState("7d")

  return (
    <ContextMenu>
      <ContextMenuTrigger className="flex h-36 w-full max-w-sm items-center justify-center rounded-lg border border-dashed border-border-strong text-text-secondary">
        Right-click the alerts chart
      </ContextMenuTrigger>
      <ContextMenuContent className="w-52">
        <ContextMenuCheckboxItem
          checked={showGrid}
          onCheckedChange={setShowGrid}
        >
          Show grid lines
        </ContextMenuCheckboxItem>
        <ContextMenuCheckboxItem
          checked={showLegend}
          onCheckedChange={setShowLegend}
        >
          Show legend
        </ContextMenuCheckboxItem>
        <ContextMenuSeparator />
        <ContextMenuLabel>Time range</ContextMenuLabel>
        <ContextMenuRadioGroup value={range} onValueChange={setRange}>
          <ContextMenuRadioItem value="24h">Last 24 hours</ContextMenuRadioItem>
          <ContextMenuRadioItem value="7d">Last 7 days</ContextMenuRadioItem>
          <ContextMenuRadioItem value="30d">Last 30 days</ContextMenuRadioItem>
        </ContextMenuRadioGroup>
      </ContextMenuContent>
    </ContextMenu>
  )
}
```

## Accessibility

- Inside the open menu, arrow keys move between items, Enter runs the focused item and Escape
  closes the menu. Opening it from the keyboard depends on the browser and operating system
  (Shift+F10 or the context menu key), which is why the actions need a visible alternative.
- `ContextMenuLabel` is a visual heading and is not announced as the group's name.

## API reference

`import { ... } from "@zenoxai/ui/components/context-menu"`

### ContextMenu

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| actionsRef | `RefObject<MenuRootActions \| null>` |  | A ref to imperative actions. - `unmount`: Ends the closing phase of the menu after an externally controlled closing animation finishes.   Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the menu completes closing on its own.   Whether it leaves the DOM is decided by `keepMounted` on the portal. - `close`: Closes the menu imperatively when called. |
| closeParentOnEsc | `boolean` |  | @ignore @deprecated This prop has no effect on Context Menu. |
| defaultOpen | `boolean` | `false` | Whether the menu is initially open.  To render a controlled menu, use the `open` prop instead. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| highlightItemOnHover | `boolean` | `true` | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
| loopFocus | `boolean` | `true` | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. |
| onItemHighlighted | `((highlightedItem: HTMLElement, eventDetails: MenuRootHighlightEventDetails) => void)` |  | Callback fired when an item is highlighted or unhighlighted. Receives the highlighted item element (or `undefined` if no item is highlighted) and details containing the reason for the change, the event, and the item's text label. The `reason` can be: - `'keyboard'`: the highlight changed due to keyboard navigation. - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent`   rather than a `PointerEvent`. - `'none'`: the highlight changed for another reason, such as automatic highlighting while   filtering, the item list changing, or the popup opening or closing. |
| onOpenChange | `((open: boolean, eventDetails: ContextMenuRootChangeEventDetails) => void)` |  | Event handler called when the menu is opened or closed. |
| onOpenChangeComplete | `((open: boolean) => void)` |  | Event handler called after any animations complete when the menu is opened or closed. |
| open | `boolean` |  | Whether the menu is currently open. |
| orientation | `"horizontal" \| "vertical"` | `'vertical'` | The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. |

### ContextMenuTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, ContextMenuTriggerState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| align | `"center" \| "start" \| "end"` | `start` | How to align the popup relative to the specified side. |
| alignOffset | `number \| OffsetFunction` | `4` | Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.  The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.  Defaults to `2` for root context menus when `side` is not specified and `align` is not `'center'`. Otherwise, it defaults to `0`. @example ```jsx <ContextMenu.Positioner   alignOffset={({ side, anchor }) => {     return side === 'top' \|\| side === 'bottom' ? anchor.width : anchor.height;   }} /> ``` |
| finalFocus | `boolean \| RefObject<HTMLElement \| null> \| ((closeType: InteractionType) => boolean \| void \| HTMLElement \| null)` |  | Determines the element to focus when the menu is closed.  - `false`: Do not move focus. - `true`: Move focus based on the default behavior (trigger or previously focused element). - `RefObject`: Move focus to the ref element. - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).   Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing. |
| id | `string` |  | @ignore |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPopupState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |
| side | `"left" \| "right" \| "top" \| "bottom" \| "inline-end" \| "inline-start"` | `right` | Which side of the anchor element to align the popup against. May automatically change to avoid collisions.  Submenus default to `'inline-end'`. |
| sideOffset | `number \| OffsetFunction` | `0` | Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.  The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.  Defaults to `-5` for root context menus when `side` is not specified and `align` is not `'center'`. Otherwise, it defaults to `0`. @example ```jsx <ContextMenu.Positioner   sideOffset={({ side, anchor }) => {     return side === 'top' \|\| side === 'bottom' ? anchor.height : anchor.width;   }} /> ``` |

### ContextMenuItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| closeOnClick | `boolean` | `true` | Whether to close the menu when the item is clicked. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| id | `string` |  | @ignore |
| inset | `boolean` |  | Indents the text to line up with items that have a leading icon. |
| label | `string` |  | Overrides the text used for keyboard text navigation and filtering. Falls back to the rendered text when not provided. |
| nativeButton | `boolean` | `true` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`). |
| onClick | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)` |  | The click handler for the menu item. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuItemState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |
| variant | `"default" \| "destructive"` | `default` | `destructive` colors the item red, for delete and other risky actions. |

### ContextMenuCheckboxItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| checked | `boolean` |  | Whether the checkbox item is currently ticked.  To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. |
| closeOnClick | `boolean` | `false` | Whether to close the menu when the item is clicked. |
| defaultChecked | `boolean` | `false` | Whether the checkbox item is initially ticked.  To render a controlled checkbox item, use the `checked` prop instead. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| id | `string` |  | @ignore |
| inset | `boolean` |  | Indents the text to line up with items that have a leading icon. |
| label | `string` |  | Overrides the text used for keyboard text navigation and filtering. Falls back to the rendered text when not provided. |
| nativeButton | `boolean` | `true` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`). |
| onCheckedChange | `((checked: boolean, eventDetails: MenuRootChangeEventDetails) => void)` |  | Event handler called when the checkbox item is ticked or unticked. |
| onClick | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)` |  | The click handler for the menu item. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuCheckboxItemState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuRadioItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| closeOnClick | `boolean` | `false` | Whether to close the menu when the item is clicked. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| id | `string` |  | @ignore |
| inset | `boolean` |  | Indents the text to line up with items that have a leading icon. |
| label | `string` |  | Overrides the text used for keyboard text navigation and filtering. Falls back to the rendered text when not provided. |
| nativeButton | `boolean` | `true` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`). |
| onClick | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)` |  | The click handler for the menu item. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuRadioItemState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |
| value (required) | `any` |  | Value of the radio item. This is the value that will be set in the MenuRadioGroup when the item is selected. |

### ContextMenuLabel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| inset | `boolean` |  | Indents the text to line up with items that have a leading icon. |

### ContextMenuSeparator

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| orientation | `"horizontal" \| "vertical"` | `vertical` | The orientation of the separator. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, SeparatorState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuShortcut

No props of its own.

### ContextMenuGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuGroupState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuPortal

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| container | `HTMLElement \| ShadowRoot \| RefObject<HTMLElement \| ShadowRoot \| null> \| null` |  | A parent element to render the portal element into. |
| keepMounted | `boolean` | `false` | Whether to keep the portal mounted in the DOM while the popup is hidden. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPortalState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuSub

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| actionsRef | `RefObject<MenuRootActions \| null>` |  | A ref to imperative actions. - `unmount`: Ends the closing phase of the menu after an externally controlled closing animation finishes.   Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the menu completes closing on its own.   Whether it leaves the DOM is decided by `keepMounted` on the portal. - `close`: Closes the menu imperatively when called. |
| closeParentOnEsc | `boolean` | `false` | When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. |
| defaultOpen | `boolean` | `false` | Whether the menu is initially open.  To render a controlled menu, use the `open` prop instead. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| highlightItemOnHover | `boolean` | `true` | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state. |
| loopFocus | `boolean` | `true` | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. |
| onItemHighlighted | `((highlightedItem: HTMLElement, eventDetails: MenuRootHighlightEventDetails) => void)` |  | Callback fired when an item is highlighted or unhighlighted. Receives the highlighted item element (or `undefined` if no item is highlighted) and details containing the reason for the change, the event, and the item's text label. The `reason` can be: - `'keyboard'`: the highlight changed due to keyboard navigation. - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent`   rather than a `PointerEvent`. - `'none'`: the highlight changed for another reason, such as automatic highlighting while   filtering, the item list changing, or the popup opening or closing. |
| onOpenChange | `((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)` |  | Event handler called when the menu is opened or closed. |
| onOpenChangeComplete | `((open: boolean) => void)` |  | Event handler called after any animations complete when the menu is opened or closed. |
| open | `boolean` |  | Whether the menu is currently open. |
| orientation | `"horizontal" \| "vertical"` | `'vertical'` | The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. |

### ContextMenuSubContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| align | `"center" \| "start" \| "end"` | `start` | How to align the popup relative to the specified side. |
| alignOffset | `number \| OffsetFunction` | `4` | Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment.  The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.  Defaults to `2` for root context menus when `side` is not specified and `align` is not `'center'`. Otherwise, it defaults to `0`. @example ```jsx <ContextMenu.Positioner   alignOffset={({ side, anchor }) => {     return side === 'top' \|\| side === 'bottom' ? anchor.width : anchor.height;   }} /> ``` |
| finalFocus | `boolean \| RefObject<HTMLElement \| null> \| ((closeType: InteractionType) => boolean \| void \| HTMLElement \| null)` |  | Determines the element to focus when the menu is closed.  - `false`: Do not move focus. - `true`: Move focus based on the default behavior (trigger or previously focused element). - `RefObject`: Move focus to the ref element. - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).   Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing. |
| id | `string` |  | @ignore |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuPopupState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |
| side | `"left" \| "right" \| "top" \| "bottom" \| "inline-end" \| "inline-start"` | `right` | Which side of the anchor element to align the popup against. May automatically change to avoid collisions.  Submenus default to `'inline-end'`. |
| sideOffset | `number \| OffsetFunction` | `0` | Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment.  The function takes a `data` object parameter with the following properties: - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`. - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`. - `data.side`: which side of the anchor element the positioner is aligned against. - `data.align`: how the positioner is aligned relative to the specified side.  Defaults to `-5` for root context menus when `side` is not specified and `align` is not `'center'`. Otherwise, it defaults to `0`. @example ```jsx <ContextMenu.Positioner   sideOffset={({ side, anchor }) => {     return side === 'top' \|\| side === 'bottom' ? anchor.height : anchor.width;   }} /> ``` |

### ContextMenuSubTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| closeDelay | `number` | `0` | How long to wait before closing the menu that was opened on hover. Specified in milliseconds.  Requires the `openOnHover` prop. |
| delay | `number` | `100` | How long to wait before the menu may be opened on hover. Specified in milliseconds.  Requires the `openOnHover` prop. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| id | `string` |  | @ignore |
| inset | `boolean` |  | Indents the text to line up with items that have a leading icon. |
| label | `string` |  | Overrides the text used for keyboard text navigation and filtering. Falls back to the rendered text when not provided. |
| nativeButton | `boolean` | `true` | Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`). |
| onClick | `((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)` |  |  |
| openOnHover | `boolean` | `true` | Whether the menu should also open when the trigger is hovered. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |

### ContextMenuRadioGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| defaultValue | `any` |  | The uncontrolled value of the radio item that should be initially selected.  To render a controlled radio group, use the `value` prop instead. |
| disabled | `boolean` | `false` | Whether the component should ignore user interaction. |
| onValueChange | `((value: any, eventDetails: MenuRootChangeEventDetails) => void)` |  | Function called when the selected value changes. |
| render | `ReactElement<unknown, string \| JSXElementConstructor<any>> \| ComponentRenderFn<HTMLProps, MenuRadioGroupState>` |  | Allows you to replace the component's HTML element with a different tag, or compose it with another component.  Accepts a `ReactElement` or a function that returns the element to render. |
| value | `any` |  | The controlled value of the radio item that should be currently selected.  To render an uncontrolled radio group, use the `defaultValue` prop instead. |

