It's a Vanilla JavaScript widget that can detect a user's internet connection status and display a notification if the user disconnected from the internet in real-time, you can customize this widget and use it on your website or web application, I also created 2 CSS animations to display and hiding that notification
https://saeedkohansal.github.io/JavaScript-Internet-Connection-Checker-Real-Time/