menu
Ce contenu n’est pas encore disponible dans votre langue.
Enumerations
Section titled “Enumerations”NativeIcon
Section titled “NativeIcon”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L17
A native Icon to be used for the menu item
Platform-specific:
- Windows / Linux: Unsupported.
Enumeration Members
Section titled “Enumeration Members”Add: "Add";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L19
An add item template image.
Advanced
Section titled “Advanced”Advanced: "Advanced";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L21
Advanced preferences toolbar icon for the preferences window.
Bluetooth
Section titled “Bluetooth”Bluetooth: "Bluetooth";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L23
A Bluetooth template image.
Bookmarks
Section titled “Bookmarks”Bookmarks: "Bookmarks";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L25
Bookmarks image suitable for a template.
Caution
Section titled “Caution”Caution: "Caution";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L27
A caution image.
ColorPanel
Section titled “ColorPanel”ColorPanel: "ColorPanel";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L29
A color panel toolbar icon.
ColumnView
Section titled “ColumnView”ColumnView: "ColumnView";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L31
A column view mode template image.
Computer
Section titled “Computer”Computer: "Computer";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L33
A computer icon.
EnterFullScreen
Section titled “EnterFullScreen”EnterFullScreen: "EnterFullScreen";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L35
An enter full-screen mode template image.
Everyone
Section titled “Everyone”Everyone: "Everyone";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L37
Permissions for all users.
ExitFullScreen
Section titled “ExitFullScreen”ExitFullScreen: "ExitFullScreen";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L39
An exit full-screen mode template image.
FlowView
Section titled “FlowView”FlowView: "FlowView";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L41
A cover flow view mode template image.
Folder
Section titled “Folder”Folder: "Folder";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L43
A folder image.
FolderBurnable
Section titled “FolderBurnable”FolderBurnable: "FolderBurnable";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L45
A burnable folder icon.
FolderSmart
Section titled “FolderSmart”FolderSmart: "FolderSmart";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L47
A smart folder icon.
FollowLinkFreestanding
Section titled “FollowLinkFreestanding”FollowLinkFreestanding: "FollowLinkFreestanding";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L49
A link template image.
FontPanel
Section titled “FontPanel”FontPanel: "FontPanel";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L51
A font panel toolbar icon.
GoLeft
Section titled “GoLeft”GoLeft: "GoLeft";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L53
A go back template image.
GoRight
Section titled “GoRight”GoRight: "GoRight";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L55
A go forward template image.
Home: "Home";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L57
Home image suitable for a template.
IChatTheater
Section titled “IChatTheater”IChatTheater: "IChatTheater";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L59
An iChat Theater template image.
IconView
Section titled “IconView”IconView: "IconView";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L61
An icon view mode template image.
Info: "Info";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L63
An information toolbar icon.
InvalidDataFreestanding
Section titled “InvalidDataFreestanding”InvalidDataFreestanding: "InvalidDataFreestanding";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L65
A template image used to denote invalid data.
LeftFacingTriangle
Section titled “LeftFacingTriangle”LeftFacingTriangle: "LeftFacingTriangle";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L67
A generic left-facing triangle template image.
ListView
Section titled “ListView”ListView: "ListView";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L69
A list view mode template image.
LockLocked
Section titled “LockLocked”LockLocked: "LockLocked";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L71
A locked padlock template image.
LockUnlocked
Section titled “LockUnlocked”LockUnlocked: "LockUnlocked";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L73
An unlocked padlock template image.
MenuMixedState
Section titled “MenuMixedState”MenuMixedState: "MenuMixedState";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L75
A horizontal dash, for use in menus.
MenuOnState
Section titled “MenuOnState”MenuOnState: "MenuOnState";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L77
A check mark template image, for use in menus.
MobileMe
Section titled “MobileMe”MobileMe: "MobileMe";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L79
A MobileMe icon.
MultipleDocuments
Section titled “MultipleDocuments”MultipleDocuments: "MultipleDocuments";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L81
A drag image for multiple items.
Network
Section titled “Network”Network: "Network";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L83
A network icon.
Path: "Path";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L85
A path button template image.
PreferencesGeneral
Section titled “PreferencesGeneral”PreferencesGeneral: "PreferencesGeneral";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L87
General preferences toolbar icon for the preferences window.
QuickLook
Section titled “QuickLook”QuickLook: "QuickLook";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L89
A Quick Look template image.
Refresh
Section titled “Refresh”Refresh: "Refresh";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L93
A refresh template image.
RefreshFreestanding
Section titled “RefreshFreestanding”RefreshFreestanding: "RefreshFreestanding";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L91
A refresh template image.
Remove
Section titled “Remove”Remove: "Remove";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L95
A remove item template image.
RevealFreestanding
Section titled “RevealFreestanding”RevealFreestanding: "RevealFreestanding";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L97
A reveal contents template image.
RightFacingTriangle
Section titled “RightFacingTriangle”RightFacingTriangle: "RightFacingTriangle";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L99
A generic right-facing triangle template image.
Share: "Share";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L101
A share view template image.
Slideshow
Section titled “Slideshow”Slideshow: "Slideshow";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L103
A slideshow template image.
SmartBadge
Section titled “SmartBadge”SmartBadge: "SmartBadge";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L105
A badge for a smart item.
StatusAvailable
Section titled “StatusAvailable”StatusAvailable: "StatusAvailable";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L107
Small green indicator, similar to iChat’s available image.
StatusNone
Section titled “StatusNone”StatusNone: "StatusNone";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L109
Small clear indicator.
StatusPartiallyAvailable
Section titled “StatusPartiallyAvailable”StatusPartiallyAvailable: "StatusPartiallyAvailable";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L111
Small yellow indicator, similar to iChat’s idle image.
StatusUnavailable
Section titled “StatusUnavailable”StatusUnavailable: "StatusUnavailable";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L113
Small red indicator, similar to iChat’s unavailable image.
StopProgress
Section titled “StopProgress”StopProgress: "StopProgress";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L117
A stop progress button template image.
StopProgressFreestanding
Section titled “StopProgressFreestanding”StopProgressFreestanding: "StopProgressFreestanding";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L115
A stop progress template image.
TrashEmpty
Section titled “TrashEmpty”TrashEmpty: "TrashEmpty";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L119
An image of the empty trash can.
TrashFull
Section titled “TrashFull”TrashFull: "TrashFull";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L121
An image of the full trash can.
User: "User";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L123
Permissions for a single user.
UserAccounts
Section titled “UserAccounts”UserAccounts: "UserAccounts";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L125
User account toolbar icon for the preferences window.
UserGroup
Section titled “UserGroup”UserGroup: "UserGroup";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L127
Permissions for a group of users.
UserGuest
Section titled “UserGuest”UserGuest: "UserGuest";Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L129
Permissions for guests.
Classes
Section titled “Classes”CheckMenuItem
Section titled “CheckMenuItem”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L20
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L71
Returns whether this check menu item is checked or not.
Returns
Section titled “Returns”Promise<boolean>
isEnabled()
Section titled “isEnabled()”isEnabled(): Promise<boolean>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L48
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L62
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L76
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L53
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L39
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L34
Returns the text of this check menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<CheckMenuItem>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L27
Create a new check menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
CheckMenuItemOptions |
Returns
Section titled “Returns”IconMenuItem
Section titled “IconMenuItem”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L151
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L177
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L191
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L182
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L200
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L168
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L163
Returns the text of this icon menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<IconMenuItem>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L158
Create a new icon menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
IconMenuItemOptions |
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L48
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]append()
Section titled “append()”append<T>(items): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L73
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L196
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L131
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L184
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L219
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L102
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L155
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L166
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L237
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L251
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L60
Create a default menu.
Returns
Section titled “Returns”static new(opts?): Promise<Menu>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L55
Create a new menu.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts? |
MenuOptions |
Returns
Section titled “Returns”MenuItem
Section titled “MenuItem”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L23
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L49
Returns whether this menu item is enabled or not.
Returns
Section titled “Returns”Promise<boolean>
setAccelerator()
Section titled “setAccelerator()”setAccelerator(accelerator): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L63
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L54
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L40
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L35
Returns the text of this menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<MenuItem>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L30
Create a new menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
MenuItemOptions |
Returns
Section titled “Returns”PredefinedMenuItem
Section titled “PredefinedMenuItem”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L112
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]close()
Section titled “close()”close(): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L133
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L128
Returns the text of this predefined menu item.
Returns
Section titled “Returns”Promise<string>
static new(opts?): Promise<PredefinedMenuItem>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L119
Create a new predefined menu item.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts? |
PredefinedMenuItemOptions |
Returns
Section titled “Returns”Submenu
Section titled “Submenu”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L60
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/base.ts#L128
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L363
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”MenuItemBase.ridMethods
Section titled “Methods”[asyncDispose]()
Section titled “[asyncDispose]()”asyncDispose: Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L381
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”MenuItemBase.[asyncDispose]append()
Section titled “append()”append<T>(items): Promise<void>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L106
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L375
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L229
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L164
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L86
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L217
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L251
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L135
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L188
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L199
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L291
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L273
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L91
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L298
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L77
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L72
Returns the text of this submenu.
Returns
Section titled “Returns”Promise<string>
static new(opts): Promise<Submenu>;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L67
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L10
A metadata for the about predefined menu item.
Properties
Section titled “Properties”CheckMenuItemOptions
Section titled “CheckMenuItemOptions”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/checkMenuItem.ts#L10
Options for creating a new check menu item.
Extends
Section titled “Extends”Properties
Section titled “Properties”IconMenuItemOptions
Section titled “IconMenuItemOptions”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L133
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L17 |
action? |
(id) => void |
Specify a handler to be called when this menu item is activated. | MenuItemOptions.action |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L19 |
enabled? |
boolean |
Whether the new menu item is enabled or not. | MenuItemOptions.enabled |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L15 |
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/iconMenuItem.ts#L144 |
id? |
string |
Specify an id to use for the new menu item. | MenuItemOptions.id |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L11 |
text |
string |
The text of the new menu item. | MenuItemOptions.text |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L13 |
MenuItemOptions
Section titled “MenuItemOptions”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L9
Options for creating a new menu item.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
accelerator? |
string |
Specify an accelerator for the new menu item. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L17 |
action? |
(id) => void |
Specify a handler to be called when this menu item is activated. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L19 |
enabled? |
boolean |
Whether the new menu item is enabled or not. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L15 |
id? |
string |
Specify an id to use for the new menu item. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L11 |
text |
string |
The text of the new menu item. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menuItem.ts#L13 |
MenuOptions
Section titled “MenuOptions”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L23
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L25 |
items? |
( | Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions)[] |
List of items to add to the new menu. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/menu.ts#L27 |
PredefinedMenuItemOptions
Section titled “PredefinedMenuItemOptions”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L84
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L88 |
text? |
string |
The text of the new predefined menu item. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/predefinedMenuItem.ts#L86 |
Type Aliases
Section titled “Type Aliases”SubmenuOptions
Section titled “SubmenuOptions”type SubmenuOptions = Omit<MenuItemOptions, "accelerator" | "action"> & MenuOptions & object;Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L50
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: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/menu/submenu.ts#L56 |
© 2026 Tauri Contributors. CC-BY / MIT