menu
Enumerations
Section titled “Enumerations”NativeIcon
Section titled “NativeIcon”Source: undefined
A native Icon to be used for the menu item
Platform-specific:
- Windows / Linux: Unsupported.
Enumeration Members
Section titled “Enumeration Members”Add: "Add";Source: undefined
An add item template image.
Advanced
Section titled “Advanced”Advanced: "Advanced";Source: undefined
Advanced preferences toolbar icon for the preferences window.
Bluetooth
Section titled “Bluetooth”Bluetooth: "Bluetooth";Source: undefined
A Bluetooth template image.
Bookmarks
Section titled “Bookmarks”Bookmarks: "Bookmarks";Source: undefined
Bookmarks image suitable for a template.
Caution
Section titled “Caution”Caution: "Caution";Source: undefined
A caution image.
ColorPanel
Section titled “ColorPanel”ColorPanel: "ColorPanel";Source: undefined
A color panel toolbar icon.
ColumnView
Section titled “ColumnView”ColumnView: "ColumnView";Source: undefined
A column view mode template image.
Computer
Section titled “Computer”Computer: "Computer";Source: undefined
A computer icon.
EnterFullScreen
Section titled “EnterFullScreen”EnterFullScreen: "EnterFullScreen";Source: undefined
An enter full-screen mode template image.
Everyone
Section titled “Everyone”Everyone: "Everyone";Source: undefined
Permissions for all users.
ExitFullScreen
Section titled “ExitFullScreen”ExitFullScreen: "ExitFullScreen";Source: undefined
An exit full-screen mode template image.
FlowView
Section titled “FlowView”FlowView: "FlowView";Source: undefined
A cover flow view mode template image.
Folder
Section titled “Folder”Folder: "Folder";Source: undefined
A folder image.
FolderBurnable
Section titled “FolderBurnable”FolderBurnable: "FolderBurnable";Source: undefined
A burnable folder icon.
FolderSmart
Section titled “FolderSmart”FolderSmart: "FolderSmart";Source: undefined
A smart folder icon.
FollowLinkFreestanding
Section titled “FollowLinkFreestanding”FollowLinkFreestanding: "FollowLinkFreestanding";Source: undefined
A link template image.
FontPanel
Section titled “FontPanel”FontPanel: "FontPanel";Source: undefined
A font panel toolbar icon.
GoLeft
Section titled “GoLeft”GoLeft: "GoLeft";Source: undefined
A go back template image.
GoRight
Section titled “GoRight”GoRight: "GoRight";Source: undefined
A go forward template image.
Home: "Home";Source: undefined
Home image suitable for a template.
IChatTheater
Section titled “IChatTheater”IChatTheater: "IChatTheater";Source: undefined
An iChat Theater template image.
IconView
Section titled “IconView”IconView: "IconView";Source: undefined
An icon view mode template image.
Info: "Info";Source: undefined
An information toolbar icon.
InvalidDataFreestanding
Section titled “InvalidDataFreestanding”InvalidDataFreestanding: "InvalidDataFreestanding";Source: undefined
A template image used to denote invalid data.
LeftFacingTriangle
Section titled “LeftFacingTriangle”LeftFacingTriangle: "LeftFacingTriangle";Source: undefined
A generic left-facing triangle template image.
ListView
Section titled “ListView”ListView: "ListView";Source: undefined
A list view mode template image.
LockLocked
Section titled “LockLocked”LockLocked: "LockLocked";Source: undefined
A locked padlock template image.
LockUnlocked
Section titled “LockUnlocked”LockUnlocked: "LockUnlocked";Source: undefined
An unlocked padlock template image.
MenuMixedState
Section titled “MenuMixedState”MenuMixedState: "MenuMixedState";Source: undefined
A horizontal dash, for use in menus.
MenuOnState
Section titled “MenuOnState”MenuOnState: "MenuOnState";Source: undefined
A check mark template image, for use in menus.
MobileMe
Section titled “MobileMe”MobileMe: "MobileMe";Source: undefined
A MobileMe icon.
MultipleDocuments
Section titled “MultipleDocuments”MultipleDocuments: "MultipleDocuments";Source: undefined
A drag image for multiple items.
Network
Section titled “Network”Network: "Network";Source: undefined
A network icon.
Path: "Path";Source: undefined
A path button template image.
PreferencesGeneral
Section titled “PreferencesGeneral”PreferencesGeneral: "PreferencesGeneral";Source: undefined
General preferences toolbar icon for the preferences window.
QuickLook
Section titled “QuickLook”QuickLook: "QuickLook";Source: undefined
A Quick Look template image.
Refresh
Section titled “Refresh”Refresh: "Refresh";Source: undefined
A refresh template image.
RefreshFreestanding
Section titled “RefreshFreestanding”RefreshFreestanding: "RefreshFreestanding";Source: undefined
A refresh template image.
Remove
Section titled “Remove”Remove: "Remove";Source: undefined
A remove item template image.
RevealFreestanding
Section titled “RevealFreestanding”RevealFreestanding: "RevealFreestanding";Source: undefined
A reveal contents template image.
RightFacingTriangle
Section titled “RightFacingTriangle”RightFacingTriangle: "RightFacingTriangle";Source: undefined
A generic right-facing triangle template image.
Share: "Share";Source: undefined
A share view template image.
Slideshow
Section titled “Slideshow”Slideshow: "Slideshow";Source: undefined
A slideshow template image.
SmartBadge
Section titled “SmartBadge”SmartBadge: "SmartBadge";Source: undefined
A badge for a smart item.
StatusAvailable
Section titled “StatusAvailable”StatusAvailable: "StatusAvailable";Source: undefined
Small green indicator, similar to iChat’s available image.
StatusNone
Section titled “StatusNone”StatusNone: "StatusNone";Source: undefined
Small clear indicator.
StatusPartiallyAvailable
Section titled “StatusPartiallyAvailable”StatusPartiallyAvailable: "StatusPartiallyAvailable";Source: undefined
Small yellow indicator, similar to iChat’s idle image.
StatusUnavailable
Section titled “StatusUnavailable”StatusUnavailable: "StatusUnavailable";Source: undefined
Small red indicator, similar to iChat’s unavailable image.
StopProgress
Section titled “StopProgress”StopProgress: "StopProgress";Source: undefined
A stop progress button template image.
StopProgressFreestanding
Section titled “StopProgressFreestanding”StopProgressFreestanding: "StopProgressFreestanding";Source: undefined
A stop progress template image.
TrashEmpty
Section titled “TrashEmpty”TrashEmpty: "TrashEmpty";Source: undefined
An image of the empty trash can.
TrashFull
Section titled “TrashFull”TrashFull: "TrashFull";Source: undefined
An image of the full trash can.
User: "User";Source: undefined
Permissions for a single user.
UserAccounts
Section titled “UserAccounts”UserAccounts: "UserAccounts";Source: undefined
User account toolbar icon for the preferences window.
UserGroup
Section titled “UserGroup”UserGroup: "UserGroup";Source: undefined
Permissions for a group of users.
UserGuest
Section titled “UserGuest”UserGuest: "UserGuest";Source: undefined
Permissions for guests.
Classes
Section titled “Classes”CheckMenuItem
Section titled “CheckMenuItem”Source: undefined
A check menu item inside a Menu or Submenu
and usually contains a text and a check mark or a similar toggle
that corresponds to a checked and unchecked states.
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closeisChecked()
Section titled “isChecked()”isChecked(): Promise<boolean>;Source: undefined
Returns whether this check menu item is checked or not.
Returns
Section titled “Returns”Promise<boolean>
isEnabled()
Section titled “isEnabled()”isEnabled(): Promise<boolean>;Source: undefined
Returns whether this check menu item is enabled or not.
Returns
Section titled “Returns”Promise<boolean>
setAccelerator()
Section titled “setAccelerator()”setAccelerator(accelerator): Promise<void>;Source: undefined
Sets the accelerator for this check menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
accelerator |
string | null |
Returns
Section titled “Returns”Promise<void>
setChecked()
Section titled “setChecked()”setChecked(checked): Promise<void>;Source: undefined
Sets whether this check menu item is checked or not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
checked |
boolean |
Returns
Section titled “Returns”Promise<void>
setEnabled()
Section titled “setEnabled()”setEnabled(enabled): Promise<void>;Source: undefined
Sets whether this check menu item is enabled or not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”Promise<void>
setText()
Section titled “setText()”setText(text): Promise<void>;Source: undefined
Sets the text for this check menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”Promise<void>
text()
Section titled “text()”text(): Promise<string>;Source: undefined
Returns the text of this check menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<CheckMenuItem>;Source: undefined
Create a new check menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
CheckMenuItemOptions |
Returns
Section titled “Returns”IconMenuItem
Section titled “IconMenuItem”Source: undefined
An icon menu item inside a Menu or Submenu
and usually contains an icon and a text.
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closeisEnabled()
Section titled “isEnabled()”isEnabled(): Promise<boolean>;Source: undefined
Returns whether this icon menu item is enabled or not.
Returns
Section titled “Returns”Promise<boolean>
setAccelerator()
Section titled “setAccelerator()”setAccelerator(accelerator): Promise<void>;Source: undefined
Sets the accelerator for this icon menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
accelerator |
string | null |
Returns
Section titled “Returns”Promise<void>
setEnabled()
Section titled “setEnabled()”setEnabled(enabled): Promise<void>;Source: undefined
Sets whether this icon menu item is enabled or not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”Promise<void>
setIcon()
Section titled “setIcon()”setIcon(icon): Promise<void>;Source: undefined
Sets an icon for this icon menu item
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
icon |
MenuIcon | null |
Returns
Section titled “Returns”Promise<void>
setText()
Section titled “setText()”setText(text): Promise<void>;Source: undefined
Sets the text for this icon menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”Promise<void>
text()
Section titled “text()”text(): Promise<string>;Source: undefined
Returns the text of this icon menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<IconMenuItem>;Source: undefined
Create a new icon menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
IconMenuItemOptions |
Returns
Section titled “Returns”Source: undefined
A type that is either a menu bar on the window on Windows and Linux or as a global menu in the menubar on macOS.
Platform-specific:
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]append()
Section titled “append()”append<T>(items): Promise<void>;Source: undefined
Add a menu item to the end of this menu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
Returns
Section titled “Returns”Promise<void>
close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closeget(id): Promise< | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem| null>;Source: undefined
Retrieves the menu item matching the given identifier.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”Promise<
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem
| null>
insert()
Section titled “insert()”insert<T>(items, position): Promise<void>;Source: undefined
Add a menu item to the specified position in this menu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
position |
number |
Returns
Section titled “Returns”Promise<void>
items()
Section titled “items()”items(): Promise<( | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem| IconMenuItem)[]>;Source: undefined
Returns a list of menu items that has been added to this menu.
Returns
Section titled “Returns”Promise<(
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem)[]>
popup()
Section titled “popup()”popup(at?, window?): Promise<void>;Source: undefined
Popup this menu as a context menu on the specified window.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
at? |
| PhysicalPosition | LogicalPosition | Position |
If a position is provided, it is relative to the window’s top-left corner. If there isn’t one provided, the menu will pop up at the current location of the mouse. |
window? |
Window |
- |
Returns
Section titled “Returns”Promise<void>
prepend()
Section titled “prepend()”prepend<T>(items): Promise<void>;Source: undefined
Add a menu item to the beginning of this menu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
Returns
Section titled “Returns”Promise<void>
remove()
Section titled “remove()”remove(item): Promise<void>;Source: undefined
Remove a menu item from this menu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
item |
| Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem |
Returns
Section titled “Returns”Promise<void>
removeAt()
Section titled “removeAt()”removeAt(position): Promise< | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem| null>;Source: undefined
Remove a menu item from this menu at the specified position.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
position |
number |
Returns
Section titled “Returns”Promise<
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem
| null>
setAsAppMenu()
Section titled “setAsAppMenu()”setAsAppMenu(): Promise<Menu | null>;Source: undefined
Sets the app-wide menu and returns the previous one.
If a window was not created with an explicit menu or had one set explicitly, this menu will be assigned to it.
Returns
Section titled “Returns”setAsWindowMenu()
Section titled “setAsWindowMenu()”setAsWindowMenu(window?): Promise<Menu | null>;Source: undefined
Sets the window menu and returns the previous one.
Platform-specific:
- macOS: Unsupported. The menu on macOS is app-wide and not specific to one
window, if you need to set it, use
Menu.setAsAppMenuinstead.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
window? |
Window |
Returns
Section titled “Returns”default()
Section titled “default()”static default(): Promise<Menu>;Source: undefined
Create a default menu.
Returns
Section titled “Returns”static new(opts?): Promise<Menu>;Source: undefined
Create a new menu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts? |
MenuOptions |
Returns
Section titled “Returns”MenuItem
Section titled “MenuItem”Source: undefined
A menu item inside a Menu or Submenu and contains only text.
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closeisEnabled()
Section titled “isEnabled()”isEnabled(): Promise<boolean>;Source: undefined
Returns whether this menu item is enabled or not.
Returns
Section titled “Returns”Promise<boolean>
setAccelerator()
Section titled “setAccelerator()”setAccelerator(accelerator): Promise<void>;Source: undefined
Sets the accelerator for this menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
accelerator |
string | null |
Returns
Section titled “Returns”Promise<void>
setEnabled()
Section titled “setEnabled()”setEnabled(enabled): Promise<void>;Source: undefined
Sets whether this menu item is enabled or not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”Promise<void>
setText()
Section titled “setText()”setText(text): Promise<void>;Source: undefined
Sets the text for this menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”Promise<void>
text()
Section titled “text()”text(): Promise<string>;Source: undefined
Returns the text of this menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<MenuItem>;Source: undefined
Create a new menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
MenuItemOptions |
Returns
Section titled “Returns”PredefinedMenuItem
Section titled “PredefinedMenuItem”Source: undefined
A predefined (native) menu item which has a predefined behavior by the OS or by tauri.
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closesetText()
Section titled “setText()”setText(text): Promise<void>;Source: undefined
Sets the text for this predefined menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”Promise<void>
text()
Section titled “text()”text(): Promise<string>;Source: undefined
Returns the text of this predefined menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts?): Promise<PredefinedMenuItem>;Source: undefined
Create a new predefined menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts? |
PredefinedMenuItemOptions |
Returns
Section titled “Returns”Submenu
Section titled “Submenu”Source: undefined
A type that is a submenu inside a Menu or Submenu.
Extends
Section titled “Extends”MenuItemBase
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get id(): string;Source: undefined
The id of this item.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MenuItemBase.idGet Signature
Section titled “Get Signature”get rid(): number;Source: undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: undefined
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]append()
Section titled “append()”append<T>(items): Promise<void>;Source: undefined
Add a menu item to the end of this submenu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
Returns
Section titled “Returns”Promise<void>
close()
Section titled “close()”close(): Promise<void>;Source: undefined
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.closeget(id): Promise< | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem| null>;Source: undefined
Retrieves the menu item matching the given identifier.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”Promise<
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem
| null>
insert()
Section titled “insert()”insert<T>(items, position): Promise<void>;Source: undefined
Add a menu item to the specified position in this submenu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
position |
number |
Returns
Section titled “Returns”Promise<void>
isEnabled()
Section titled “isEnabled()”isEnabled(): Promise<boolean>;Source: undefined
Returns whether this submenu is enabled or not.
Returns
Section titled “Returns”Promise<boolean>
items()
Section titled “items()”items(): Promise<( | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem| IconMenuItem)[]>;Source: undefined
Returns a list of menu items that has been added to this submenu.
Returns
Section titled “Returns”Promise<(
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem)[]>
popup()
Section titled “popup()”popup(at?, window?): Promise<void>;Source: undefined
Popup this submenu as a context menu on the specified window.
If the position, is provided, it is relative to the window’s top-left corner.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
at? |
| PhysicalPosition | LogicalPosition |
window? |
Window |
Returns
Section titled “Returns”Promise<void>
prepend()
Section titled “prepend()”prepend<T>(items): Promise<void>;Source: undefined
Add a menu item to the beginning of this submenu.
Platform-specific:
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
T | T[] |
Returns
Section titled “Returns”Promise<void>
remove()
Section titled “remove()”remove(item): Promise<void>;Source: undefined
Remove a menu item from this submenu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
item |
| Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem |
Returns
Section titled “Returns”Promise<void>
removeAt()
Section titled “removeAt()”removeAt(position): Promise< | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem| null>;Source: undefined
Remove a menu item from this submenu at the specified position.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
position |
number |
Returns
Section titled “Returns”Promise<
| Submenu
| MenuItem
| PredefinedMenuItem
| CheckMenuItem
| IconMenuItem
| null>
setAsHelpMenuForNSApp()
Section titled “setAsHelpMenuForNSApp()”setAsHelpMenuForNSApp(): Promise<void>;Source: undefined
Set this submenu as the Help menu for the application on macOS.
This will cause macOS to automatically add a search box to the menu.
If no menu is set as the Help menu, macOS will automatically use any menu which has a title matching the localized word “Help”.
Platform-specific:
- Windows / Linux: Unsupported.
Returns
Section titled “Returns”Promise<void>
setAsWindowsMenuForNSApp()
Section titled “setAsWindowsMenuForNSApp()”setAsWindowsMenuForNSApp(): Promise<void>;Source: undefined
Set this submenu as the Window menu for the application on macOS.
This will cause macOS to automatically add window-switching items and certain other items to the menu.
Platform-specific:
- Windows / Linux: Unsupported.
Returns
Section titled “Returns”Promise<void>
setEnabled()
Section titled “setEnabled()”setEnabled(enabled): Promise<void>;Source: undefined
Sets whether this submenu is enabled or not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
enabled |
boolean |
Returns
Section titled “Returns”Promise<void>
setIcon()
Section titled “setIcon()”setIcon(icon): Promise<void>;Source: undefined
Sets an icon for this submenu
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
icon |
MenuIcon | null |
Returns
Section titled “Returns”Promise<void>
setText()
Section titled “setText()”setText(text): Promise<void>;Source: undefined
Sets the text for this submenu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
Returns
Section titled “Returns”Promise<void>
text()
Section titled “text()”text(): Promise<string>;Source: undefined
Returns the text of this submenu.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<Submenu>;Source: undefined
Create a new submenu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
SubmenuOptions |
Returns
Section titled “Returns”Interfaces
Section titled “Interfaces”AboutMetadata
Section titled “AboutMetadata”Source: undefined
A metadata for the about predefined menu item.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
authors? |
string[] |
The authors of the application. Platform-specific - macOS: Unsupported. | Source: undefined |
comments? |
string |
Application comments. Platform-specific - macOS: Unsupported. | Source: undefined |
copyright? |
string |
The copyright of the application. | Source: undefined |
credits? |
string |
The credits. Platform-specific - Windows / Linux: Unsupported. | Source: undefined |
icon? |
| string | Image | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[] |
The application icon. Platform-specific - Windows: Unsupported. | Source: undefined |
license? |
string |
The license of the application. Platform-specific - macOS: Unsupported. | Source: undefined |
name? |
string |
Sets the application name. | Source: undefined |
shortVersion? |
string |
The short version, e.g. “1.0”. Platform-specific - Windows / Linux: Appended to the end of version in parentheses. |
Source: undefined |
version? |
string |
The application version. | Source: undefined |
website? |
string |
The application website. Platform-specific - macOS: Unsupported. | Source: undefined |
websiteLabel? |
string |
The website label. Platform-specific - macOS: Unsupported. | Source: undefined |
CheckMenuItemOptions
Section titled “CheckMenuItemOptions”Source: undefined
Options for creating a new check menu item.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
accelerator? |
string |
Specify an accelerator for the new menu item. | MenuItemOptions.accelerator |
Source: undefined |
action? |
(id) => void |
Specify a handler to be called when this menu item is activated. | MenuItemOptions.action |
Source: undefined |
checked? |
boolean |
Whether the new check menu item is enabled or not. | - | Source: undefined |
enabled? |
boolean |
Whether the new menu item is enabled or not. | MenuItemOptions.enabled |
Source: undefined |
id? |
string |
Specify an id to use for the new menu item. | MenuItemOptions.id |
Source: undefined |
text |
string |
The text of the new menu item. | MenuItemOptions.text |
Source: undefined |
IconMenuItemOptions
Section titled “IconMenuItemOptions”Source: undefined
Options for creating a new icon menu item.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
accelerator? |
string |
Specify an accelerator for the new menu item. | MenuItemOptions.accelerator |
Source: undefined |
action? |
(id) => void |
Specify a handler to be called when this menu item is activated. | MenuItemOptions.action |
Source: undefined |
enabled? |
boolean |
Whether the new menu item is enabled or not. | MenuItemOptions.enabled |
Source: undefined |
icon? |
MenuIcon |
Icon to be used for the new icon menu item. Note that you may need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file: [dependencies] tauri = { version = "...", features = ["...", "image-png"] } |
- | Source: undefined |
id? |
string |
Specify an id to use for the new menu item. | MenuItemOptions.id |
Source: undefined |
text |
string |
The text of the new menu item. | MenuItemOptions.text |
Source: undefined |
MenuItemOptions
Section titled “MenuItemOptions”Source: undefined
Options for creating a new menu item.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”MenuOptions
Section titled “MenuOptions”Source: undefined
Options for creating a new menu.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
id? |
string |
Specify an id to use for the new menu. | Source: undefined |
items? |
( | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions)[] |
List of items to add to the new menu. | Source: undefined |
PredefinedMenuItemOptions
Section titled “PredefinedMenuItemOptions”Source: undefined
Options for creating a new predefined menu item.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
item |
| "Separator" | "Copy" | "Cut" | "Paste" | "SelectAll" | "Undo" | "Redo" | "Minimize" | "Maximize" | "Fullscreen" | "Hide" | "HideOthers" | "ShowAll" | "CloseWindow" | "Quit" | "Services" | "BringAllToFront" | { About: | AboutMetadata | null; } |
The predefined item type | Source: undefined |
text? |
string |
The text of the new predefined menu item. | Source: undefined |
Type Aliases
Section titled “Type Aliases”SubmenuOptions
Section titled “SubmenuOptions”type SubmenuOptions = Omit<MenuItemOptions, "accelerator" | "action"> & MenuOptions & object;Source: undefined
Type Declaration
Section titled “Type Declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
icon? |
MenuIcon |
Icon to be used for the submenu. Note: you may need the image-ico or image-png Cargo features to use this API. |
Source: undefined |
© 2026 Tauri Contributors. CC-BY / MIT