DropdownMenuItem API
API reference docs for theDropdownMenuItemcomponent. For examples and details on the usage of this component, visit the component demo page.
Props
| Prop | Type | Description | Default |
|---|---|---|---|
children | React.ReactNode | The content of the dropdown menu item. | _ |
id? | string | An optional ID for the menu item; auto-generated if not provided. | _ |
onClick? | onClick?: () => boolean | void; | Function to be called when the item is clicked; if it returns false, the dropdown will remain open. | _ |
size? | 'standard'|'large' | Size of the menu item. | standard |
Note: The DropdownMenuItem component can render as different HTML elements (e.g., label, a, div) based on the as prop, providing flexibility for various use cases in dropdown menus.