🧰 Tray

We allow you to add to the system's tray (notification area)

What is the Tray

The Tray is the area where applications can put their icons to be easily accessed by users. On macOS this is the menubar and on Windows it's the system tray.


Works on macOS only. Will throw on Windows & Linux



This will destroy the tray item immediately


Example: Building a tray timer

Suppose we wanted to show users a 60 second timer in the tray

function startTimer () {
let remainingTime = 60;
let timer = setInterval(() => {
// Set the tray title to the remaining time
`Remaining: ${remainingTime}`
remainingTime -= 1;
if (remainingTime < 0) clearInterval(timer);
}, 1000);

This will give you something like: