toastKing.js

toastKing is a light-weight JavaScript library for creating non-blocking, beautiful notification messages.

Demo
Star this project

    toastKing({                  
        message:'hello globe!',     
        duration:5,
        progressBarVis:true,
        borderVis:false,
        shadowVis:true,
        type:'success',
        design:'plain',
        stopOnFocus:true,
        onClick:function(){},
        onDismiss:function(){}
    })
            

All values of design attribute

moss
sunnyDays
anwar
plain
stripe
endlessRiver
instagram
ukraine
celestial
meredian

All values of type attribute, with plain design

danger
warning
success
ok
info
prohibited

borderVis attribute

borderVis:true
borderVis:false

shadowVis attribute

shadowVis:true
shadowVis:false

stopOnFocus attribute

stopOnFocus:true
stopOnFocus:false

progressBarVis attribute

progressBarVis:true
progressBarVis:false

onClick attribute

onClick:function(){alert('you clicked!')}
onClick:function(){}

onDismiss attribute

onDismiss:function(){alert('you dismissed!')}
onDismiss:function(){}

Default values of the attributes

AttributeValue
Message""
Duration5
progressBarVistrue
borderVisfalse
shadowVistrue
type"none"
design"plain"
stopOnFocustrue
onClickfunction(){}
onDismissfunction(){}

Installation: Put the following above the script tag having the toastKing(..) function.

<script src="https://rudraworks.github.io/toastKing/main.js"> </script>