In this video I will show you how to build a highly customisable toast notification using vanilla JavaScript that allows user to control the position, type (success or error), message content, and duration of display of the toast notification.
You will learn a lot of important JavaScript concepts upon implementing this project and I highly recommend you to watch the entire video.
Github source code: https://github.com/suvang/Toast-js
0:00 - Complete DEMO (IMP)
4:25 - Initial setup
6:22 - rendering the button
8:02 - getting started with main logic
9:00 - Intuition & implementation walkthrough
10:05 - initializing all functions
13:43 - init function logic
19:10 - show function logic
39:05 - setToastPlacement function logic
49:21 - initialising deleteId
51:22 - removeToast function logic & UI
57:43 - setRemainingTime function logic
1:05:26 - fixing a bug
1:07:23 - final demo of complete project
1:09:32 - Minor Refactor
1:12:00 - End
On this page of the site you can watch the video online Customisable Toast Notification in JavaScript | stacking timers, animations, DOM interaction & more with a duration of hours minute second in good quality, which was uploaded by the user xplodivity 07 June 2022, share the link with friends and acquaintances, this video has already been watched 923 times on youtube and it was liked by 24 viewers. Enjoy your viewing!