Notificationer V2

Easily notify your users from client-side JavaScript. It's as simple as calling the function notify().

Quick Start

Add the following script to your HTML file before your own script tag(s):

<script src='https://joelgrayson.com/software/notificationer/notificationer.js'></script>

Start with config(). Then, notify() as many times as you want. Check out the full documentation for more details.

<script src='https://joelgrayson.com/software/notificationer/notificationer.js'></script>
<script>
	config(); //check full documentation for config() options
	notify('Hello world');
	notify('Success', 'green');
	notify('Confirmation required <button>confirm</button>', 'red');
</script>

Result: result

Full Documentation

Deprecated Features

Legacy Start (Module)

Prior to version 2.0, the only way to use notificationer was by importing it with type='module'.

<script type='module'>
	import * as nf from 'https://joelgrayson.com/software/notificationer/module.js'; //Import notificationer
	nf.config(); //check full documentation for config() options
	nf.notify('Hello world');
	nf.notify('Success', 'green');
	nf.notify('Confirmation required <button>confirm</button>', 'red');
</script>

Result: result

Interactive Sandbox

Try the code sandbox at https://joelgrayson.com/software/notificationer/sandbox/v2.html.

Examples

Notify() & Close()

let errorNotificationId=nf.notify('Error', 'red'); //store notification id
nf.close(errorNotificationId); //close notification