Stackable Top Notification Bars In Vanilla JavaScript – js-notify

Category: Javascript , Notification | April 16, 2018
Author:keyml
Views Total:1,348 views
Official Page:Go to website
Last Update:April 16, 2018
License:MIT

Preview:

Stackable Top Notification Bars In Vanilla JavaScript – js-notify

Description:

A dead simple JavaScript library to display stackable top notification bars without any dependencies.

How to use it:

Insert the minified version of the js-notify library into the webpage.

<script src="notify-min.js"></script>

Create a top notification bar.

notify.show('Notification', 'black', '#ffeb3b', 5, true)

Possible parameters:

  • text: notification text
  • textColor: text color
  • bgColor: background color
  • timer: auto close after this timeout (in seconds)
  • close: shows close button
notify.show(text, textColor, bgColor, timer, close);

Close the notification bar manually.

let myNotify = notify.show('Notification', 'black', '#ffeb3b', 5, true)
notify.remove(myNotify)

You Might Be Interested In:


Leave a Reply