How to use

Node.js

import AWN from "awesome-notifications"
// Set global options
let globalOptions =  {...}
// Initialize instance of AWN
let notifier = new AWN(globalOptions)

// Set custom options for next call if needed, it will override globals
let nextCallOptions = {...}
// Call one of available functions
notifier.success('Your custom message', nextCallOptions)

Browser

<script>
  let notifier = new AWN(globalOptions);
</script>
<button onclick="notifier.success('Your custom message', currentCallOptions);">Show Success</button>

Methods Overview

Method Description
tip() Show gray toast with any valid HTML you passed in
info() Show blue toast with any valid HTML you passed in
warning() Show orange toast with any valid HTML you passed in
success() Show green toast with any valid HTML you passed in
alert() Show red toast with any valid HTML you passed in
async() Show async toast, until passed Promise will be completed
modal() Show modal window
confirm() Show confirmation window
asyncBlock() Show popup which blocks the screen, until passed Promise will be completed