toastmsg-js

ToastMsg displays a small message like a toast.


Keywords
toast, msg, toastmsg
License
CC-BY-4.0
Install
npm install toastmsg-js@1.0.0

Documentation

ToastMsg Documentation

Inspired by Google Toast Message.

Include this file

<script src="https://tobiasroeder.github.io/toastmsg/{version}/toastmsg.min.js"></script>

Syntax (Example)

toastMsg({
	color: 'white',
	bgColor: '#444',
	fontSize: '22px',
	fontFamily: 'monospace',
	value: 'Hello World',
	position: 'right',
	duration: 2000
});

Default settings

type value
color #fff
bgColor #242424
fontSize 16px
fontFamily 'Helvetica Neue', 'Helvetica', sans-serif
position left
duration 3000

Example here: https://tobiasroeder.github.io/toastmsg
Try it yourself