siiimple-toast
Toast message inspired by material design
siiimple-toast is a Pure Javascript library for non-blocking notifications.
Demo
https://eunseok.me/siiimple-toast/
Installation
npm
$ yarn add siiimple-toast
cdn
<!-- import css --><!-- import js -->
Getting started
npm
;;// style required toast;
cdn
if you want to customize style, see style.css or style.scss
Onther examples
// success messagetoast; // alert messagetoast; // support HTMLtoast; // message with optionstoast; // support chainingtoast ;
Options
Use .setOptions()
to set options
toast = toast;
container
(string
): selector for parent of toast elements (defaults tobody
)- use
position: relative
,overflow: hidden
to prevent overflow
- use
class
(string
): css class for toast element (defaults tosiiimpleToast
)position
(string
): positioning toast element (defaults totop|center
)- available:
top|left
,top|center
,top|right
,bottom|left
,bottom|center
,bottom|right
- available:
margin
(number
): margin between multiple toast (defaults to15px
)delay
(number
): delay before showing toast element (defaults to0ms
)duration
(number
): duration to show toast element (defaults to3000ms
)style
(object
): styles for customize tosat element (defaults to{}
)
Available
IE9+, Chrome, Opera
License
This project is licensed under the MIT License