Toastify
Toastify is a lightweight, vanilla JS toast notification library.
Demo
Click here
Installation
Toastify now supports installation via NPM
npm install --save toastify-js
or
yarn add toastify-js -S
Using Toastify using the traditional method
To start using Toastify, add the following CSS on to your page.
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
And the script at the bottom of the page
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
Documentation
Toastify({
text: "This is a toast",
duration: 3000,
destination: 'https://github.com/apvarun/toastify-js',
newWindow: true,
close: true,
gravity: "top",
positionLeft: true,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)"
}).showToast();
Toast messages will be centered on devices with screen width less than 360px.
License
MIT © Varun A P