Tray

    On MacOS and Ubuntu, the Tray will be located on the top right corner of your screen, adjacent to your battery and wifi icons. On Windows, the Tray will usually be located in the bottom right corner.

    First we must import , Tray, , nativeImage from .

    ```js title=’main.js’ let tray

    app.whenReady().then(() => { const icon = nativeImage.createFromPath(‘path/to/asset.png’) tray = new Tray(icon)

    The code above will create 4 separate radio-type items in the context menu. To read more about constructing native menus, click here.

    Finally, let’s give our tray a tooltip and a title.

    fiddle docs/fiddles/native-ui/tray