/Simple-Alert

This project is a remake of SweetAlert (1) to make basic beautiful alert boxes.

Primary LanguageJavaScript

Simple-Alert

This project is a remake of SweetAlert (1) to make basic beautiful alert boxes.

Welcome to Simple-Alert

Amazing / basic alert, confirm, and prompt boxes.

The library loads SweetAlert (1) and makes its on custom styles for the alert box.

Alert box

Alert

Confirm box

Confirm

Prompt box

Prompt


Getting started

1-Line code embed with CDNjs.

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Parking-Master/Simple-Alert@latest/simplealert.js"></script>

For the minified version:

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Parking-Master/Simple-Alert@latest/simplealert.min.js"></script>

Read the documentation below to make your amazing alert boxes!

Documentation

You can also try a live preview before you start.

Alert box

simple.alert("Your message", function() {
/* Function after "OK" is pressed */
});

Confirm box

simple.confirm("Do you really want to do this?", function() {
/*
* Function after "OK" is pressed.
* If "Cancel" is pressed, the box will close
*/
});

Prompt box

simple.prompt("Enter something:", "", (val) => {
/* "val" is the value from the input. */
});

Try it out!


Copyright (c) 2021 Parking Master

License

MIT