alphahm / toast

Animated toast notification in web pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

toast

A simple (perhaps simplistic) toast notification script.

Usage

Transpiled Javascript and css are located in the dist folder. Both are needed.

And to use:

let toast = Toast.Instance;
toast.notify(0, "This is an info message!");

For now, there are just two types of notification, 0 for info and 1 for warning. This is the first parameter to the notify() method, the second parameter being the message.

Long messages will be cropped.

Development/Improve it

Typescript script as well as the companion css are in the src folder.

Acknowledgments

About

Animated toast notification in web pages

License:MIT License


Languages

Language:TypeScript 47.6%Language:CSS 20.3%Language:HTML 16.9%Language:JavaScript 15.2%