Customizable System Level Web Notification with Vanilla JavaScript – Screamer.JS

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


Customizable System Level Web Notification with Vanilla JavaScript – Screamer.JS


Screamer.JS is a lightweight Vanilla JavaScript library which brings your web notifications to the system level using Web Notifications API.

Basic usage:

Include the screamer.js JavaScript file anywhere on your web page.

<script src="screamer.js"></script>

Create a button to toggle the web notification.

<button id="demo" title="Press me">Click me</button>

Create an new instance of Screamer.

var options = {
    // options here
var scream = new Screamer(options);

Bind the click event to the trigger button and display the web notification using scream.notify() methods.

var button = document.querySelector('#demo');
button.addEventListener('click', function(){

All configuration options.

'title': 'Notification title',
'body': 'Notification message',
'icon': 'icon_success.png', // notification icon
'fade': 1000, // fade animation speed
'timeout': 2000, // timeout in ms

More methods.

// test for Web Notifications API browser support.
// Verify if permission exists, if not, request a permission and verify if granted.

Callback functions available.

var scream = new Screamer({
    before: function(){},
    after: function(){}



  • Add before and after callbacks

You Might Be Interested In:

Leave a Reply