Skip to main content

MenuLink class

📖 Description​

The MenuLink class defines a menu link item for the Menu class. It is used to create a menu item that links to an URL. It is derived from the MenuOption class.


🆕 constructor​

Creates a new MenuLink instance.

Signature​

constructor(label: string, url: string, target?: "self" | "blank"): MenuLink

Parameters​

NameTypeOptionalDescription
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 MenuLink instance.