Sweet Alert

A beautiful replacement for Javascript's "Alert"

So... What does it do?

Here’s a comparison of a standard error message. The first one uses the built-in alert-function, while the second is using sweetAlert.

Normal alert

Code:
alert("Oops... Something went wrong!");

	

Sweet Alert

Code:
sweetAlert("Oops...", "Something went wrong!", "error");

Pretty cool huh? SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizeable, as you can see below!

More examples

In these examples, we're using the shorthand function swal to call sweetAlert.