Window Menu
このコンテンツはまだ日本語訳がありません。
Native application menus can be attached to both to a window or system tray. Available on desktop.
Creating a base-level menu
To create a base-level native window menu, and attach to a window:
Use the Menu.new
static function to create a window menu:
Listening to events on custom menu items
Each custom menu item triggers an event when clicked. Use the on_menu_event
API to handle them.
Creating a multi-level menu
To create a multi-level menu, you can add some submenus to the menu item:
Note that you need to enable image-ico
or image-png
feature to use this API:
Creating predefined menu
To use built-in (native) menu items that has predefined behavior by the operating system or Tauri:
For more preset capabilities, please refer to the documentation PredefinedMenuItem
.
Change menu status
If you want to change the status of the menu, such as text, icon, or check status, you can set_menu
again:
© 2025 Tauri Contributors. CC-BY / MIT