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>
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!
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
};
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.