> ## Documentation Index
> Fetch the complete documentation index at: https://electron-menubar.gitify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# electron-menubar: build menubar desktop apps with Electron

> electron-menubar is a high level way to create menubar desktop applications with Electron, with zero runtime dependencies on macOS, Windows, and Linux.

`electron-menubar` (formerly known as `menubar`) is a high level way to create menubar desktop applications with Electron. It handles the tray icon, popup window, positioning, and platform-specific focus behavior so your app has less to implement itself.

## Features

* ⚡️ Quick start for creating menubar applications using Electron.
* 🚀 Zero runtime dependencies.
* 💻 Works on macOS, Windows and *most* Linux distributions. See [tested platforms](https://electron-menubar.gitify.io/platforms/supported-platforms.md).

> [card] macOS

> [card] Windows 10

> [card] Ubuntu

> [!NOTE]
>
> On native Wayland, the desktop compositor controls window placement, so the
> popover cannot be anchored to the tray icon and is positioned by the desktop
> (usually centered). This is a Wayland limitation, not something the library
> can override. Tray-relative positioning works under X11/XWayland. See [window
> positioning on Linux](https://electron-menubar.gitify.io/platforms/linux-window-positioning.md) for the detail and
> a workaround.

> [card] [Quickstart](https://electron-menubar.gitify.io/quickstart.md)
>
> Install the package and run your first menubar app.

> [card] [Options](https://electron-menubar.gitify.io/api-reference/options.md)
>
> Every option you can pass to `menubar()`.

> [card] [Popup Behavior](https://electron-menubar.gitify.io/guides/popup-behavior.md)
>
> Control click-away dismissal and stacking.

> [card] [Examples](https://electron-menubar.gitify.io/guides/examples.md)
>
> Working example apps to start from.

## Why electron-menubar?

`electron-menubar` builds on [max-mapper/menubar](https://github.com/max-mapper/menubar), with fixes and controls developed for [Gitify](https://github.com/gitify-app/gitify). The original provides the tray-app foundation. This fork brings more of the platform-specific behavior into the library so applications have less to implement themselves.

| Area | What this fork adds |
| - | - |
| Windows focus and positioning | Ignores transient blur events immediately after opening, keeps resized windows clear of the taskbar, handles left-side taskbars, and prevents recursive resize events during repositioning. |
| Windows tray overflow | Raises popups above the hidden-icons panel automatically and still dismisses on click-away. Apps use the same keep-open option on every platform. **Available since 11.0.0.** |
| macOS | Opens on the active Space when another app is fullscreen, hides the Dock icon again after Electron's startup race, and ignores tray double-clicks by default to avoid flicker. |
| Linux tray menus | Publishes native tray context menus and provides `refreshContextMenu()` to update them after menu items change. Documents native Wayland positioning limits and the XWayland workaround. |
| Window controls | Built-in `hideOnClose`, `escapeToHide`, configurable tray triggers, global shortcuts, `toggleWindow()`, and `recenterOnTray()`. Closing can hide the window while real quits and updater restarts still work. |
| Instance cleanup | `destroy()` removes the instance's listeners and unregisters its global shortcut. |
| Packaging | Zero runtime dependencies, including a built-in positioner. Ships CommonJS and ESM entry points with TypeScript declarations. |
| Verification | Unit tests, native Electron end-to-end tests on macOS, Windows, and Linux, and visual checks that the tray icon and window render. The [platform report](https://electron-menubar.gitify.io/platforms/supported-platforms.md) includes screenshots and positioning limitations. |

See the [changelog](https://github.com/gitify-app/electron-menubar/blob/main/CHANGELOG.md) for released changes and the [API documentation](https://electron-menubar.gitify.io/api-reference/menubar.md) for all options.

## Acknowledgements

Originally created by [Max](https://github.com/max-mapper), hard-forked from [max-mapper/menubar](https://github.com/max-mapper/menubar).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.