Simple browser notification library

Usage no npm install needed!

<script type="module">
  import notifySl from '';


finwo / notify-sl

npm npm

Simple notification library


another notification library, you ask?

Because most don't provide a clear interface AND are theme-able with simple css.


npm install --save notify-sl



First, you'll need to include either of these scripts inside your page. If requirejs' define function was found, it will register itself under the name notify-sl.

<script type="text/javascript" src="/path/to/bower/components/notify-sl/dist/notify-sl.js"></script>
<script type="text/javascript" src="/path/to/bower/components/notify-sl/dist/notify-sl.min.js"></script>

After including it on your page, you can start sending notifications to your users as follows:

notifysl.alert(  'message', 'title', options, callback);
notifysl.confirm('message', 'title', options, callback);
notifysl.prompt( 'message', 'title', options, callback);

// For if you want more control:{
  closeAll: <boolean>, // Indicates if you want to close all other notifications
  callback: <function>,
  buttons: {
    'buttonText': <value>,      // Gets the classes: btn btn-default btn-primary
    'someOtherButton': <value>, // Gets the classes: btn btn-default
  timeout: <milliseconds>,
  // Either contents or message+title
  contents: <html, jq object, jq object array>,
  message: 'notification text',
  title: 'notification title'


Sorry, this package is not intended for usage outside of a browser.


After checking the Github issues and confirming that your request isn't already being worked on, feel free to spawn a new fork of the develop branch & send in a pull request.

The develop branch is merged periodically into the master after confirming it's stable, to make sure the master always contains a production-ready version.