apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.09k stars 230 forks source link

Add a progress bar showing the time until the toast closes #109

Closed konclave closed 2 weeks ago

konclave commented 1 year ago

Implemented the progress bar that shows the time until the toast closes (#94)

How to use:

Toastify({
        progressBar: true,
        progressBarColor: 'coral',
        text: "With progress bar",
        gravity: "top",
        position: 'left'
    }).showToast();

Animation is done with CSS animation property.

bengabp commented 1 year ago

Please review and merge the pull requests, There are some features I need to use in my web project.

DieterHolvoet commented 1 year ago

If #112 gets merged, we'll have to make sure to restart the progress bar animation after re-focusing the page. I already wrote the code, but one of two PR's will have to be merged before we can add that.