> ## 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.

# Quickstart: create your first Electron menubar app

> Install electron-menubar, create an app entry file and an HTML page, and run your first tray-based Electron menubar application in three steps.

`electron-menubar` gives you a tray icon and a popup window with a single `menubar()` call. This guide installs the package and runs a minimal app with Electron.

> [!NOTE]
>
> `electron-menubar` requires `electron` version 35.0.0 or later as a peer
> dependency.

## Installation

```bash theme={null}
pnpm add electron-menubar
```

## Usage

**1. Create the project files**

Starting with your own new project, run these commands:

```bash theme={null}
pnpm add electron-menubar
touch myApp.js
touch index.html
```

**2. Write your app**

Fill `index.html` with some HTML, and `myApp.js` like this:

```javascript myApp.js theme={null}
const { menubar } = require('electron-menubar');

const mb = menubar();

mb.on('ready', () => {
  console.log('app is ready');
  // your app code here
});
```

The package ships both CommonJS and ESM entry points with TypeScript declarations, so you can also use `import { menubar } from 'electron-menubar'`.

**3. Run the app**

Then use `electron` to run the app:

```bash theme={null}
electron myApp.js
```

By default, menubar loads `index.html` from the app source directory (`process.cwd()`) and uses `IconTemplate.png` from the same directory as the tray icon. See [Options](https://electron-menubar.gitify.io/api-reference/options.md) to change these.

## Next steps

> [card] [Options](https://electron-menubar.gitify.io/api-reference/options.md)
>
> Configure the window, icon, position, and triggers.

> [card] [Examples](https://electron-menubar.gitify.io/guides/examples.md)
>
> Explore working example apps.


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