Is a simple Notification Toast 🍞 JavaScirpt without any front-end libraries (except Font Awesome ), it can be used in any type of project and easily modified
-
Copy files from this repositorie in your website
./assets/toast.css./assets/toast.js -
Add these lines in your page
Page header :
<link rel="stylesheet" href="/assets/toast/toast.css"/>
Page Body :
<script type="text/javascript" src="/assets/toast/toast.js"></script>
toastNotif({
text: 'Lorem Ipsum is simply dummy text of the printing', // Text
color: '#5bc83f', // Color of Notification
timeout: 5000, // Spawn time
icon: 'valid' // Icon name (config in toast.js)
});<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo Toast Notification</title>
<link rel="stylesheet" type="text/css" href="./toast.css">
</head>
<body>
<script type="text/javascript" src="./toast.js"></script>
</body>
</html>