A simple and lightweight javascript library to create a toast on your website.
Create your own toast now!
First you need to include ttoast.js into your project. You can download the js file or use
jsDelivr:
<script src="https://cdn.jsdelivr.net/gh/togihon/TToast@update/ttoast.js"></script>
Use the code below to show a toast on your page.
TToast({ text: 'Your text' })
TToast({ text: 'Your text', position: 'top|right' })
TToast({ text: 'Your text', position: 'bottom|left', fontsize: 'large' })
TToast({ text: 'Your text', position: 'bottom|left', fontsize: 'normal', color: '#2B2A4C', //for text background: '#EEE2DE' //for background })
TToast({ text: 'Your text', position: 'bottom|left', fontsize: 'normal', color: '#2B2A4C', background: '#EEE2DE', icon: 'fas fa-check' //include the font source. I use font awesome here })