Build a clipboard manager that lives in the menu bar and shows a floating popup window when the icon is clicked.
Create a quick-access weather or time widget that loads an HTML page as a menu bar popup.
Add system tray functionality to an existing Electron app with minimal configuration changes.
Build a macOS menu bar tool that shows notifications and auto-hides when the user clicks anywhere else.
Requires Electron as a base dependency, your project must already be set up as an Electron app.
menubar is a TypeScript library that simplifies building desktop applications that live in the system menu bar. These are small apps that display a tiny icon in the top menu bar on macOS or in the notification area on Windows, and open a floating window when you click on them. Examples include weather widgets, clipboard managers, or quick-access tools. The library is built on top of Electron, the framework that lets you create desktop apps using web technologies like HTML, CSS, and JavaScript. With menubar, you point it at an HTML file containing your app's interface, add a few lines of JavaScript, and it handles the rest: creating the tray icon, positioning the popup window correctly near the icon when clicked, and hiding the window when the user clicks elsewhere. You can configure the window's width and height, its position, whether it should stay visible when focus moves away, and whether to preload the window in the background so it opens instantly on click. An optional tooltip can describe the icon, and you can supply a retina-ready icon image for sharp display on high-resolution screens. The library also fires events at each stage of the window's lifecycle, such as when it shows, hides, or loses focus, so you can run custom code at any of those moments. menubar works on macOS, Windows, and most Linux desktop environments. It is available as an npm package with a single direct dependency, and weighs about 3.6 kilobytes when minified and compressed.
← max-mapper on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.