Skip to content

@tauri-apps/api

JS/TS API for interaction with the Rust backend.

Nov 28, 2026
  • 9eda95fa0 (#8656 by @naman-crabnebula) Add the pacman bundle target for Arch Linux. It produces a .tar.gz archive with a PKGBUILD and .SRCINFO ready to be published to the AUR; see bundle > linux > pacman for the package name (<name>-bin by default), release, dependencies, install script, changelog and source options. bundle > licenseFile is installed to /usr/share/licenses/<pkgname>/.

    The pacman target is part of "all", so Linux builds that bundle all targets now also produce the pacman package; list the targets explicitly in bundle > targets to opt out.

  • d267da039 (#16375 by @spokodev) Added PhysicalSize.round, PhysicalPosition.round, LogicalSize.round and LogicalPosition.round, which round to whole pixels the same way Rust does, for example new LogicalSize(301, 201).toPhysical(1.5).round(). APIs that take a Size or Position, such as Window.setSize and Window.setPosition, only accept whole physical pixels.

  • ab4d547dc (#16652 by @lucasfernog) Added iOS support for Window::set_badge_count, WebviewWindow::set_badge_count and the JavaScript Window#setBadgeCount, which sets the app icon badge. They were only available on desktop: the methods were desktop-only and the window plugin only registered the set_badge_count command there. They are now available on mobile too (a no-op on Android).

  • 740a270c6 (#14289 by @lucasfernog) Added onNewWindow option to configure whether to allow the webview to open URLs when window.open is used.

  • 05afd6e12 (#16175 by @amrbashir) Add more predefined menu items PredefinedMenuItem::section_header, paste_and_match_style, delete, zoom (an alias for maximize, named after the macOS window action), actual_size, zoom_in, zoom_out, start_speaking, stop_speaking, start_dictation and emoji_and_symbols. They are also available in JavaScript as the SectionHeader, PasteAndMatchStyle, Delete, Zoom, ActualSize, ZoomIn, ZoomOut, StartSpeaking, StopSpeaking, StartDictation and EmojiAndSymbols values of PredefinedMenuItemOptions.item.

  • d03f76daf (#16054 by @jhasheng) Add AppHandle::fetch_profile_identifiers and AppHandle::remove_profile, and the fetchProfileIdentifiers and removeProfile JS functions, to list and delete the browsing data profiles created with profile_identifier on macOS, iOS and Windows.

  • d03f76daf (#16054 by @jhasheng) Add WebviewBuilder::profile_identifier, WebviewWindowBuilder::profile_identifier, the profileIdentifier window config option and the profileIdentifier JS webview option to isolate a webview's browsing data. On macOS and iOS it maps to a WKWebsiteDataStore identifier, and on Windows to a WebView2 named profile, so webviews sharing a data directory get isolated cookies and storage while still sharing a single browser process.

  • ecab48cc1 (#16265 by @lucasfernog) Added PathResolver::resolve_external_bin and the resolveExternalBin path API to resolve the path to a sidecar binary configured in bundle > externalBin.

  • 89bb3c82f (#16179 by @amrbashir) Add TrayIconBuilder::autosave_name (the autosaveName option of the JavaScript TrayIcon.new), which sets NSStatusItem.autosaveName on macOS. macOS already restores where the user <kbd>Cmd</kbd>+dragged a tray icon on the next launch, keyed by the order in which the app created its tray icons (Item-0, Item-1, and so on); an autosave name replaces that generated key with a stable one, so an app that creates several tray icons, or that creates one conditionally, doesn't have icons come back holding each other's positions.

  • 2d6b0e572 (#16176 by @amrbashir) Add the app > trayIcon > iconIsTemplate configuration option and the matching iconIsTemplate option of the JavaScript TrayIcon.new, which draw the configured tray icon as a template image on macOS.

    Deprecate the previous iconAsTemplate names (TrayIconConfig::icon_as_template in Rust) in favour of them. Both names keep working, and either one set to true draws the icon as a template.

  • 2d6b0e572 (#16176 by @amrbashir) Add TrayIconBuilder::icon_templated and TrayIcon::set_icon_templated (TrayIcon.setIconTemplated in JavaScript), which set the tray icon and draw it as a template image in one call, so the template flag can never be left describing an icon that has since been replaced. Also add TrayIcon::icon_is_template to read that state back.

    Deprecate TrayIconBuilder::icon_as_template, TrayIcon::set_icon_as_template (TrayIcon.setIconAsTemplate in JavaScript) and TrayIcon::set_icon_with_as_template (TrayIcon.setIconWithAsTemplate in JavaScript) in favour of them.

  • d2b5ef751 (#16177 by @amrbashir) Add TrayIconBuilder::native_icon and TrayIcon::set_native_icon (the nativeIcon option of the JavaScript TrayIcon.new and TrayIcon.setNativeIcon), to use a platform-native icon such as NativeIcon::StatusAvailable for the tray icon. Known variants map to freedesktop icon names on Linux, AppKit image names on macOS and stock shell icons on Windows, so the icon follows the system theme instead of being shipped with the app.

  • 9d4d3caac (#16178 by @amrbashir) Add TrayIconBuilder::show_menu_on_right_click and TrayIcon::set_show_menu_on_right_click (the showMenuOnRightClick option of the JavaScript TrayIcon.new and TrayIcon.setShowMenuOnRightClick), to stop the menu from showing on right click, the same way it can already be disabled for left click.

  • 9d4d3caac (#16178 by @amrbashir) Add TrayIcon::show_menu (TrayIcon.showMenu in JavaScript), which shows the tray menu at the current cursor position, so an app that disabled showMenuOnLeftClick and showMenuOnRightClick can decide when the menu shows up, for instance after updating its items.

  • 1c8ab0375 (#16181 by @amrbashir) IconMenuItem::set_native_icon and Submenu::set_native_icon are no longer macOS-only. Known NativeIcon variants now map to freedesktop icon names on Linux and stock shell icons on Windows, the same as TrayIcon::set_native_icon.
  • d03f76daf (#16054 by @jhasheng) Deprecate the macOS / iOS only WebviewBuilder::data_store_identifier, WebviewWindowBuilder::data_store_identifier, the dataStoreIdentifier window config option and the dataStoreIdentifier JS webview option in favor of profile_identifier / profileIdentifier. They are not applied on Windows, so apps that already set them keep using the default WebView2 profile.
  • d03f76daf (#16054 by @jhasheng) Deprecate the macOS / iOS only AppHandle::fetch_data_store_identifiers, AppHandle::remove_data_store, fetchDataStoreIdentifiers and removeDataStore in favor of AppHandle::fetch_profile_identifiers, AppHandle::remove_profile, fetchProfileIdentifiers and removeProfile.
Nov 16, 2026
  • a99dc0e85 (#16522 by @lazerg) Fix mockIPC with shouldMockEvents so once listeners only run once and unlisten removes the mocked listener. The mocked event now carries the listener id, and plugin:event|unlisten reads eventId.
  • d40c19cfb (#16381 by @spokodev) Fix Window.onScaleChanged passing size as a plain object instead of a PhysicalSize, so methods such as toLogical were missing on it. It is now wrapped the same way as the onResized payload.
Oct 14, 2026
Oct 10, 2026
  • 0204f6f3a (#16244) Keep delivering Channel messages after the onmessage handler throws. The error is rethrown asynchronously so it is still reported as uncaught, instead of leaving every later message queued.
Oct 9, 2026
  • a916205db (#16195 by @alessandrorodi) Return an awaitable cleanup function from Window.onDragDropEvent, Window.onFocusChanged and Webview.onDragDropEvent so rejections from the inner unlisten calls can be handled instead of surfacing as unhandled promise rejections.
  • a98038ec7 (#16235 by @Legend-Master) Fix Menu/Submenu append, prepend, insert not taking MenuItemOptions as the typescript type suggests
Sep 30, 2026
  • c9a3cb892 (#16166 by @FabianLars) The macos-private-api feature flag / macOSPrivateAPI tauri.conf.json value is no longer required to use transparency or fullscreen on macOS.
Sep 26, 2026
  • d8d02ba60 (#14767) Added the exit function to @tauri-apps/api/app, backed by the new plugin:app|exit command (core:app:allow-exit permission), to exit the app without requiring the @tauri-apps/plugin-process plugin.
  • 990f77eb2 (#15961) Added JsImage type alias and documented its relationship to the Rust JsImage
  • 29265557c (#15410) Added noRedirectionBitmap option to the Window and WebviewWindow constructors on Windows.
  • 6edc2f4d4 (#14926) Added Window::set_fullscreen_on_monitor, WebviewWindow::set_fullscreen_on_monitor and the setFullscreenOnMonitor JavaScript API to make a window fullscreen on the monitor containing a given physical position, along with the core:window:allow-set-fullscreen-on-monitor permission.
  • be019795a (#14103) Add ECMAScript Explicit Resource Management to Resource. You can now use the using syntax in supported browsers or with polyfills:

    import { create, BaseDirectory } from "@tauri-apps/plugin-fs"
    ...
    {
    await using file = await create("foo/bar.txt", { baseDir: BaseDirectory.AppConfig });
    await file.write(new TextEncoder().encode("Hello world"));
    // Before `file` goes out of scope, it is disposed by calling `file[Symbol.asyncDispose]()` and awaited.
    }
  • 4a5065653 (#14454) Added Regular and Clear Liquid Glass window effects, and the interactive window effects option (macOS 27.0+) that enables the glass' visual response to user interactions.

  • 4fabe2ff1 (#16067) Fix Window.setBackgroundColor, Webview.setBackgroundColor and WebviewWindow.setBackgroundColor sending a color argument while the plugin:window|set_background_color and plugin:webview|set_webview_background_color commands expect label and value. The color was always deserialized as None, so instead of applying the given color the call cleared the background of the calling window/webview.
  • 32efd0232 (#15957) Image.rgba now returns a more specific type Promise<Uint8Array<ArrayBuffer>> instead of the default Promise<Uint8Array<ArrayBufferLike>
Jun 17, 2026
  • 916782601 (#15520 by @polw1) Document that Monitor.size, Monitor.position and Monitor.workArea are in physical pixels, with examples showing how to convert them to the logical pixels expected by window creation options via toLogical(monitor.scaleFactor).
Apr 30, 2026
  • 074299c08 (#14307) Add Bring All to Front predefined menu item type
  • a12142a48 (#14357) Add macos support for setting the icon and icon template state in the same step of the main thread, to prevent flickering.
  • 001c8fe3d (#14722) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when autocomplete="off" is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation.
  • eb0312ea9 (#15199) Propagates the Event::Suspended and Event::Resumed events from tao when they are emitted on mobile targets.
Feb 3, 2026
  • Re-release of 2.10.0 with working assets.
Feb 2, 2026
Nov 30, 2025
Oct 20, 2025
  • f5851ee00 (#14089) Adds the scrollBarStyle option to the Webview and WebviewBuilder constructors.
  • 3397fd9bf (#14133) Added app > onBackButtonPress for Android back button handling.
  • 59089723f (#14091) Added a config to set a data_directory relative to the app-specific data dir in JavaScript and tauri.conf.json.
  • 08bda64c2 (#14132) Fix core > addPluginListener failing on command permission check.
Aug 18, 2025
  • 5ba1c3faa (#13722 by @s00d) Added icon (icon and nativeIcon) support for Submenu:

    • In the Rust API (tauri), you can now set an icon for submenus via the builder and dedicated methods.
    • In the JS/TS API (@tauri-apps/api), SubmenuOptions now has an icon field, and the Submenu class provides setIcon and setNativeIcon methods.
    • Usage examples are added to the documentation and demo app.

    This is a backwards-compatible feature. Submenus can now display icons just like regular menu items.

@tauri-apps/api full changelog


© 2026 Tauri Contributors. CC-BY / MIT