Sweet Alert 2
Sweet Alert 2
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
We used some 3rd party plugins while developing the Qoduby template. We have customized these plugins according to our template. You can view examples of this plugin below.
You can find the original documentation of this plugin in the info card above.
Basic Example
Swal.fire({
text: "Click the basic example button.",
});
Success Example
Swal.fire({
text: "Congratulations, the form has been successfully submitted.",
icon: "success",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-primary"
}
});
Error Example
Swal.fire({
text: "An unexpected error has occurred, please try again later.",
icon: "error",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-danger"
}
});
Warning Example
Swal.fire({
text: "An unexpected error has occurred, please try again later.",
icon: "warning",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-warning"
}
});
Info Example
Swal.fire({
text: "The system is currently operational.",
icon: "info",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-info"
}
});