TTOAST

A simple and lightweight javascript library to create a toast on your website.

Create your own toast now!

1. Include the js file

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>
    

2. Show a toast

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
})