Astral.CSS

Astral.CSS v.3.1
Get Started
Layout
Form
Components
Utilities
JavaScript
Theme
Astral.CSS is amazing! 🚀

Toasty

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

CDN

All ready-to-use files required

<link href="https://cdn.jsdelivr.net/gh/thaboyaluya/astralcss@master/dist/css/astral.css-3.1.0.min.css" rel="stylesheet" >
<script src="https://cdn.jsdelivr.net/gh/thaboyaluya/astralcss@master/dist/js/astral%403.1.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 !')}
onHide:function(){console.log('✅ Do something after the toast disappears...')}
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()

Designed and built with by Rume Aluya.