tauritauri-2

How to change window controls position on macOS?


I noticed that many native macOS apps with headers have their controls positioned differently. I would like to emulate this behaviour with Tauri.

apple notes window controls

Currently, I have a window with a titleBarStyle set to Overlay.

Electron, for instance, offers a trafficLightPosition option.


Solution

  • Use the recently introduced trafficLightPosition option in your tauri.conf.js:

    // ...
        "windows": [
          {
            "titleBarStyle": "Overlay",
            "hiddenTitle": true,
            "trafficLightPosition": {
              "x": 19,
              "y": 25
            },
    

    note: Requires titleBarStyle: Overlay and decorations: true.