Black Lives Matter. Support the Equal Justice Initiative and read our statement here.

Electron Documentation

Progress Bar in Taskbar (Windows, macOS, Unity)

On Windows a taskbar button can be used to display a progress bar. This enables a window to provide progress information to the user without the user having to switch to the window itself.

On macOS the progress bar will be displayed as a part of the dock icon.

The Unity DE also has a similar feature that allows you to specify the progress bar in the launcher.

Progress bar in taskbar button:

Taskbar Progress Bar

All three cases are covered by the same API - the setProgressBar() method available on instances of BrowserWindows. Call it with a number between 0 and 1 to indicate your progress. If you have a long-running task that's currently at 63% towards completion, you'd call it with setProgressBar(0.63).

Generally speaking, setting the parameter to a value below zero (like -1) will remove the progress bar while setting it to a value higher than one (like 2) will switch the progress bar to intermediate mode.

See the API documentation for more options and modes.

const { BrowserWindow } = require('electron')
const win = new BrowserWindow()


Keyboard Shortcuts

Key Action
/ Focus the search bar
Esc Focus the search bar and cleans it
Select the next search result
Select the previous search result
Enter Open the selected search result
cmdEnter Ctrl+Enter Open the selected search result in a new tab