Do you want to improve the alerts of your web application?
Tired of the look of default alerts?
So, today you are in luck!
You can use SweetAlert, which is a gorgeous replacement for alerts and error messages:
It's is very simple to use. One you've included the css and js files in your source code, you just have to replace the "alert" function with the "swal" function.
alert("Oops, something went wrong!")
swal("Oops", "Something went wrong!", "error")
You have plenty of options to customize your alerts, so, let's dive into their docs, and, master it!
https://sweetalert.js.org/docs/
Happy coding!
Top comments (0)