Pretty Notification JavaScript Library – noticejs

Category: Javascript , Notification | January 15, 2018
Author:toolkito
Views Total:815 views
Official Page:Go to website
Last Update:January 15, 2018
License:MIT

Preview:

Pretty Notification JavaScript Library – noticejs

Description:

Just another zero-dependency JavaScript to create customizable, stackable and dismissable notification boxes on the webpage.

Features:

  • 4 notification types: error, warning, info, success.
  • 9 positions: top left, top right, top center, middle left, middle right, middle center, bottom left, bottom right, and bottom center.
  • Supports HTML notification content.

How to use it:

Download the zip and link to the ‘noticejs.css’ and ‘noticejs.js’ files as these.

<script src="/dist/notice.js"></script>
<link rel="stylesheet" href="/dist/noticejs.css">

Initialize the noticejs library and define the notification title & content:

NoticeJS.init({
  title: 'notification title',
  content: 'notification content'
}

Customize the notification with the following settings.

NoticeJS.init({
  title: 'notification title',
  content: 'notification content'
},{
  // error, warning, info, success.
  type: 'success',
  // topLeft, topCenter, middleLeft, middleRight, middleCenter, bottomLeft, bottomRight, bottomCenter.
  position: 'topRight',
  // shows close icon
  close: true,
  // enable auto dismis
  autoClose: true
  
}

You Might Be Interested In:


Leave a Reply