Then you create the component as usual and give it an animation class.
// Get the element you want to animateconstmyToast=document.getElementById("myToast");// Create a new animation instance und start the animationconstenterWebsite=newNeptuneAnimate(myToast,"nep-fade-in-up");enterWebsite.startAnimation();
Now you have an animation for your toast component to enter the website. But it should also leave the website again. For this you set a timeout and then call up an animation that makes the toast element disappear again.
// The toast should leave your website after 4.5 secondssetTimeout(function () {constleaveWebsite=newNeptuneAnimate(myElement,"nep-fade-out-down")leaveWebsite.startAnimation(); },4500);