The alert module is one of the default modules of the MagicMirror. This module displays notifications from other modules.
To use this module, add it to the modules array in the config/config.js file:
modules: [ < module: "alert", config: < // The config property is optional. // See 'Configuration options' for more information. >> ]
The following properties can be configured:
Option | Description |
---|---|
effect | The animation effect to use for notifications. |
For notifications use:
self.sendNotification("SHOW_ALERT", );
self.sendNotification("SHOW_ALERT", <>);
Option | Description |
---|---|
title | The title of the notification. Can contain text or html. |
titleType | The title type of the notification. |
Option | Description |
---|---|
title | The title of the alert. Can contain text or html. |
titleType | The title type of the alert. |
Possible values: See Font Awesome
Important: If you do not use the timer , it is your duty to hide the alert by using self.sendNotification("HIDE_ALERT"); !