# menuItems()

```ts
function menuItems(menu): 
  | HookExtension<HookEvent<"selection", CustomMenuSelectionEvent>>
  | null;
```

The text selection menu: react-native-webview's `menuItems`, `suppressMenuItems` and `onCustomMenuSelection`.

`items` replace the system's items, `onSelect` gets the one chosen, and on iOS `suppress` hides system items.

Turn it on when the WebView is created. After that, a change, switching it off included, applies to the next menu.

Its hook makes the WebView from a class of its own. When another hook's `webViewClass` or `webViewFactory`, registered earlier, makes it instead, there is no menu and the core warns.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `menu` | { `items?`: readonly [`MenuItem`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/MenuItem/index.md>)\[\]; `onSelect?`: (`event`) =\> `void`; `suppress?`: readonly [`SuppressMenuItem`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/SuppressMenuItem/index.md>)\[\]; } | \- |
| `menu.items?` | readonly [`MenuItem`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/MenuItem/index.md>)\[\] | \- |
| `menu.onSelect?` | (`event`) =\> `void` | \- |
| `menu.suppress?` | readonly [`SuppressMenuItem`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/SuppressMenuItem/index.md>)\[\] | **`iOS`** |

**Returns**

| [`HookExtension`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/react-native-minimal-webview/type-aliases/HookExtension/index.md>)\<[`HookEvent`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/react-native-minimal-webview/type-aliases/HookEvent/index.md>)\<`"selection"`, [`CustomMenuSelectionEvent`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/CustomMenuSelectionEvent/index.md>)\>\> | `null`

Null when `items` is unset and, on iOS, `suppress` is too.
