MenuProvider
▸ MenuProvider<T
>(props
): ReactElement
Provides a menu store to Menu components.
Type parameters
Name | Type |
---|---|
T | extends MenuStoreValues = MenuStoreValues |
Parameters
Name | Type |
---|---|
props | PickRequired <MenuProviderProps <T >, "values" | "defaultValues" > |
Returns
ReactElement
See
https://ariakit.org/components/menu (opens in a new tab)
Example
<MenuProvider placement="top">
<MenuButton>Edit</MenuButton>
<Menu>
<MenuItem>Undo</MenuItem>
<MenuItem>Redo</MenuItem>
</Menu>
</MenuProvider>
Defined in
node_modules/.pnpm/@ariakit+react-core@0.3.5_react-dom@18.2.0_react@18.2.0/node_modules/@ariakit/react-core/cjs/menu/menu-provider.d.ts:19
▸ MenuProvider(props?
): ReactElement
Parameters
Name | Type |
---|---|
props? | MenuProviderProps <MenuStoreValues > |
Returns
ReactElement
Defined in
node_modules/.pnpm/@ariakit+react-core@0.3.5_react-dom@18.2.0_react@18.2.0/node_modules/@ariakit/react-core/cjs/menu/menu-provider.d.ts:20