Skip to main content

MenuLinkWithIcon class

📖 Description​

The MenuLinkWithIcon class defines a menu link item (with an icon) for the Menu class. It is used to create a menu item that links to an URL. It is derived from the MenuLink class.


🆕 constructor​

Creates a new MenuLinkWithIcon instance.

Signature​

constructor(
icon: number,
label: string,
url: string,
target?: "self" | "blank"
): MenuLinkWithIcon

Parameters​

NameTypeOptionalDescription
iconnumberNoSpecifies the icon.
labelstringNoSpecifies the item label.
urlstringNoSpecifies the URL to link to.
target"self" | "blank"YesSpecifies the target of the link.

Return value​

Returns a reference to the new MenuLinkWithIcon instance.