Tray

Neutralino's OS API (setTray method): https://neutralino.js.org/docs/api/os#ossettrayoptions

TrayItem object

Property
Type
Description

text

string

Item text

id

string

Item id

disabled

boolean

Is item disabled (true for text, false for buttons)

checked

boolean

Is item checked (true for checkboxes, false for other)

click

(item: TrayItem) => void

Event that will be called when the item will be clicked

Tray object

constructor(icon, items)

import { Tray } from '@empathize/framework';

const tray = new Tray('path_to/my_icon.png', [
    { text: 'Example text', disabled: true },
    {
        text: 'Example button',
        click: (item) => {
            console.log(`Hey! You just clicked "${item.text}"!`);
        }
    }
]);

tray.items

List tray items

Specify tray items

tray.update(items)

tray.hide()

Last updated