ToastmeJS is a very simple, flexible and light weigth plugin that shows Notifications and modal Dialogs on your website.
Default theme
Ligh theme
Dark theme
You can customize duration, position, distance, z-overlapping and a theme
const config = {
timeout: 5000,
positionY: "bottom", // top or bottom
positionX: "center", // right left, center
distanceY: 20, // Integer value
distanceX: 20, // Integer value
zIndex: 100, // Integer value
theme: "default" // default, ligh or dark (leave empty for "default" theme)
};
Click some buttons to get some dialogs!
Dialog default
Dialog types
You can customize your toastme dialog
//Example
toastme.yesNoDialog({
title: "You are the Winner!",
text: "Do you want to pick your price?",
textConfirm: "Confirm",
textCancel: "Cancel",
showCancel: true, // true or false
type: "success" // 'success', 'danger', 'warning', 'info' or 'question'
}).then(function(value) {
if (value) {
console.log('You clicked Confirm')
} else {
console.log('You clicked Cancel')
}
});