Skip to content

MenuItem.setIcon method

MenuItem › setIcon

Official

Set the icon of the menu item.

Signature:

setIcon(icon: string | null): this

Parameters:

Parameter Type Description
icon string | null ID of the icon, can use any icon loaded with {@link addIcon} or from the built-in lucide library.

Returns: this

Since: 0.16.2