Skip to main content

Send notifications to GUI

To display custom notifications in the graphical user interface (GUI), you need to create an array of notification objects and add them to a pair ledger. Once displayed, the GUI will automatically remove these notifications from the pair ledger. = [
text: 'custom success notification',
variant: 'success', // green
persist: true // notifications stays visible until dismissed
text: 'custom error notification',
variant: 'error', // red
// persist can be omitted
text: 'custom info notification',
variant: 'info', // blue
persist: false
text: `multi line notification \n\nallow for more information spread over \nmultiple lines of text`,
variant: 'error',
persist: true,

Example of a GUI notification