<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`MenuItem`](MenuItem) › [`setIcon`](MenuItem/setIcon) ## MenuItem.setIcon() method **Signature:** ```typescript setIcon(icon: IconName | null): this; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>icon</code> | [`IconName`](IconName)<code> &#124; null</code> | ID of the icon, can use any icon loaded with [addIcon()](addIcon) or from the built-in lucide library. | **Returns:** `this`