What is it?
SimpleNotify.js is a pure javascript library for sending quick notifications to the users of your web app. It doesn't depend on any external libraries and is very lightweight and simple.
Demo
The notifications will automatically scale to fit the entire notification text.
The notifications will automatically dismiss after 7 seconds.
Instructions
SimpleNotify is easy to use.
First include simpleNotify.js and simpleNotifyStyle.css avaliable here.
Then all you need to do is call the simpleNotify function with the desired message.
simpleNotify.notify({ message:'Hey! This is a simple notification.'});
Customization
There are 4 different types of notifications: good, warning, danger, and attention.
Notification Type | Demo |
---|---|
Good | |
Warning | |
Danger | |
Attention |
To select which type of notification you want to send, simply include it as `level` argument to the simpleNotify function.
simpleNotify.notify({message: 'Hey! This is a warning notification.', level: ‘warning’});
That's all there is to it. Enjoy!
If you wish to contribute to this project please feel free to fork the repo github.com/drewdulz/simpleNotify.js and create a pull request for any updates.