Author: | willjouo |
---|---|
Views Total: | 115 views |
Official Page: | Go to website |
Last Update: | October 16, 2018 |
License: | MIT |
Preview:

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