Atom Style Notification Bar Component – dom-notifications

Category: Javascript , Notification , Recommended | August 30, 2018
Views Total:610 views
Official Page:Go to website
Last Update:August 30, 2018


Atom Style Notification Bar Component – dom-notifications


dom-notifications is a notification bar component which lets you create and display Atom-style stackable info/success/warning/error notification messages on the screen.

How to use it:

Create a bundle for the browser browserify or install the component via NPM.

npm install dom-notifications --save

Include the Octicons icon font for the notification icons.

<link rel="stylesheet" href="/path/to/octicons.min.css">

Initialize the dom-notifications.

var domNotifications = require('dom-notifications')
var notifications = domNotifications(options)

Create a default info notification bar:

notifications.add({message: 'Info message'})

Create a warning notification bar:

  • type: info, warning, error or success
notifications.add({message: 'Warning Message', type: 'warning'})
// or 
notifications.warning('Warning Message')

Customize the icon classes.

  // options
  icons: {
    error: 'octicon octicon-flame',
    warning: 'octicon octicon-alert',
    info: 'octicon octicon-info',
    success: 'octicon octicon-check',
    close: 'octicon octicon-x'



  • Update

You Might Be Interested In:

Leave a Reply