NativeNotifications

Singleton wrapper for browser system notifications with a title, message, optional icon and callback, closed after a timeout

Live preview

Open in new tab ↗
  • easy usage
  • singleton

Configuration:

  • timeout {Number} needs to contain a timeout (milliseconds) for the expiration of notification (default: 8000)
  • icon {String} (optional) an icon (default /icon.png)

Methods

  • component.append(title, message, [callback], [icon]) for creating a new notification

Usage

SETTER('nativenotifications/show', 'TITLE', 'MESSAGE', function() {
    // optional, click
}, '/img/warning-optional.png');

More UI components

Browse all 348