Tiny Toast Notification Library For jQuery - Toast.js

Tiny Toast Notification Library For jQuery - Toast.js
File Size: 2.82 KB
Views Total: 2126
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Toast.js is a small, simple, CSS-less, cross-browser jQuery toast notification plugin that you can determine how long the toast message stays on the screen.

Supports both plain Text and HTML content inside the toast notification.

How to use it:

1. Put the main JavaScript file 'Toast.js' after jQuery.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" 
<script src='./js/toast.js'></script>

2. The JavaScript to show a custom toast message on the screen.


  // toast message here
  title: 'I am a TOAST notification'


3. By default the toast notification will auto dismiss after 5 seconds. You can override the default timeout in the JavaScript:


  duration: 5000


4. Set the position of the toast notification: Top, Middle or Bottom.


  position: 'bottom' // default: 'middle'


5. Customize the appearance of the toast notification.


  // width
  width: 'auto',

  // height
  height: '28px',

  // background color
  backgroundColor: 'blue',

  // text color
  textColor: 'white',

  // line height
  lineheight: '1.6'


This awesome jQuery plugin is developed by b-withers. For more Advanced Usages, please check the demo page or visit the official website.