Super Simple JavaScript Message Toaster – toast.js

Category: Javascript , Notification | July 19, 2018
Author: mlcheng
Views Total: 11,120
Official Page: Go to website
Last Update: July 19, 2018
License: MIT

Preview:

Super Simple JavaScript Message Toaster – toast.js

Description:

toast.js is a super simple JavaScript library that shows Android style toast messages on your web applications. The toast message will destroy itself in a given amount of time.

How to use it:

Load the necessary toast.js JavaScript library in your project.

<script src="toast.js"></script>

Display a basic toast message on your web application.

var toast = new iqwerty.toast.Toast();
toast.setText('This is a basic toast message!')
.show();

Custom the duration. This toast message will auto-dismiss after a timeout (5000 ms).

var toast = new iqwerty.toast.Toast();
toast.setText('This is a basic toast message!')
.setDuration(5000)
.show();

Style the toast message.

var toast = new iqwerty.toast.Toast();
toast
.setText('This is a basic toast message!')
.stylize({
  background: 'pink',
  color: 'black',
  'box-shadow': '0 0 50px rgba(0, 0, 0, .7)'
})
.show();

Changelog:

07/19/2018

  • Fix IE toast position

 

You Might Be Interested In:


One thought on “Super Simple JavaScript Message Toaster – toast.js

Leave a Reply