The following props are available for menu component. These are the custom props that come with we've added for the menu component and you can use all the other native props as well.
Attribute | Type | Description | Default |
---|---|---|---|
open | boolean | Makes the menu open, when menu is controlled | undefined |
handler | function | Change open state for controlled menu | undefined |
placement | Placement | Change menu placement | bottom |
offset | Offset | Change menu offset from it's handler | 5 |
dismiss | Dismiss | Change dismiss listeners when clicking outside | undefined |
animate | Animate | Change menu animation | undefined |
lockScroll | boolean | Lock page scrolling when menu is opened | false |
children | node | Add content for menu | No default value it's a required prop. |
import type { MenuProps } from "@material-tailwind/react";
The following props are available for menu handler component. These are the custom props that come with we've added for the menu handler component and you can use all the other native props as well.
Attribute | Type | Description | Default |
---|---|---|---|
children | node | Add content for menu handler | No default value it's a required prop. |
import type { MenuHandlerProps } from "@material-tailwind/react";
The following props are available for menu list component. These are the custom props that come with we've added for the menu list component and you can use all the other native props as well.
Attribute | Type | Description | Default |
---|---|---|---|
className | string | Add custom className for menu list | '' |
children | node | Add content for menu list | No default value it's a required prop. |
import type { MenuListProps } from "@material-tailwind/react";
The following props are available for menu item component. These are the custom props that come with we've added for the menu item component and you can use all the other native props as well.
Attribute | Type | Description | Default |
---|---|---|---|
disabled | boolean | Disable menu item | false |
className | string | Add custom className for menu item | '' |
children | node | Add content for menu item | No default value it's a required prop. |
import type { MenuItemProps } from "@material-tailwind/react";
type placement =
| "top"
| "top-start"
| "top-end"
| "right"
| "right-start"
| "right-end"
| "bottom"
| "bottom-start"
| "bottom-end"
| "left"
| "left-start"
| "left-end";
type offset =
| number
| {
mainAxis?: number;
crossAxis?: number;
alignmentAxis?: number | null;
};
type dismissType = {
enabled?: boolean;
escapeKey?: boolean;
referencePointerDown?: boolean;
outsidePointerDown?: boolean;
ancestorScroll?: boolean;
bubbles?: boolean;
};
type animate = {
mount?: object;
unmount?: object;
};