AiraCSS Toastify

A minimal JavaScript notification module in Aira.js that lets you display customizable toast messages with smooth CSS3 transitions on your web page.

Link

All ready-to-use files required

<link href="https://cdn.jsdelivr.net/gh/thaboyaluya/astral.css-V3.0@master/css/astral.css-v3.0.min.css" rel="stylesheet" >
<script src="https://cdn.jsdelivr.net/gh/thaboyaluya/astral.css-V3.0@master/js/astral-v3.0.min.js"></script>

Usage

Simply make a plugin instance and then create a message using any of the following methods:

Toastify.default('Wow so easy')
Toastify.success('Wow so easy')
Toastify.error('Wow so easy')
Toastify.warning('Wow so easy')
Toastify.random() 

a message will appear in your web application!

Options

Here are the default options

const options={
    duration: 5000,// hide after 5000ms, // optional parameter
    callback:function(){console.log('✅ I am a callback function,Write your own function to override this !')},// executed when toast is clicked / optional parameter
    onHide:function(){console.log('✅ Do something after the toast disappears...')},// executed when toast has disappeared / optional parameter
    position:'toasts-top-right'// available position are :toasts-top-left,toasts-bottom-right and toasts-bottom-left
};

Public methods

List of available public methods:

Toastify.default(message,userOptions)
Toastify.success(message,userOptions)
Toastify.error(message,userOptions)
Toastify.warning(message,userOptions)
Toastify.random()