useMenuItem API
Demos
For examples and details on the usage of this React hook, visit the demo pages:
Import
import useMenuItem from '@mui/base/useMenuItem';
Parameters
Name | Type | Default | Description |
---|---|---|---|
ref* | React.Ref<any> | ||
disabled | boolean | ||
label | string | ||
onClick | React.MouseEventHandler<any> |
Return value
Name | Type | Default | Description |
---|---|---|---|
disabled | boolean | false | If true , the component is disabled. |
focusVisible | boolean | false | If true , the component is being focused using keyboard. |
getRootProps | <TOther extends EventHandlers = {}>(otherHandlers?: TOther) => UseMenuItemRootSlotProps<TOther> | Resolver for the root slot's props. | |
highlighted | boolean | false | If true , the component is being highlighted. |