Minimal Clean Toast Notification Library – Toastinette

Category: Javascript , Notification | October 16, 2018
Author: willjouo
Views Total: 96 views
Official Page: Go to website
Last Update: October 16, 2018
License: MIT

Preview:

Minimal Clean Toast Notification Library – Toastinette

Description:

Toastinette is a very small JavaScript notification plugin for displaying Material Design inspired toast messages on the webpage.

How to use it:

Install the toastinette with NPM.

# NPM
$ npm install toastinette --save

Or load the Toastinette plugin manually:

<link rel="stylesheet" href="dist/toastinette.min.css">
<script src="dist/toastinette.min.js"></script>

The syntax.

  • type: Notification type. Accept values: ‘success’, ‘info’, ‘warning’ or ‘error’.
  • duration: Auto dismiss after this timeout.
  • hTML: HTML content to be displayed in the toast message.
Toastinette.show(type, duration, html);

Set the position of the toast message.

  • position: Accept values: ‘tl’ (top left), ‘tr’ (top right), ‘br’ (default) or ‘bl’ (bottom left).
  • margin: Margin in pixels.
Toastinette.setPosition(position, margin);

You Might Be Interested In:


Leave a Reply