xxxxxxxxxx
customClass: {
container: 'havij',
popup: '...',
header: '...',
title: '...',
closeButton: '...',
icon: '...',
image: '...',
content: '...',
htmlContainer: '...',
input: '...',
inputLabel: '...',
validationMessage: '...',
actions: '...',
confirmButton: '...',
denyButton: '...',
cancelButton: '...',
loader: '...',
footer: '....',
timerProgressBar: '....',
}
xxxxxxxxxx
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>swal("My title", "My description", "success");</script>
xxxxxxxxxx
swal({
title: "Good job!",
text: "You clicked the button!",
icon: "success",
button: "Aww yiss!",
});
xxxxxxxxxx
swal('great job','successfully created','success',{
button:'Done' //default ok button
});
xxxxxxxxxx
//import sweetalert
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
//Alert
<script>swal("My title", "My description", "success");</script>
xxxxxxxxxx
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
timer: 1500
})
xxxxxxxxxx
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Your work has been saved',
showConfirmButton: false,
timer: 1500
})
xxxxxxxxxx
Swal.fire({
title: 'هل تريد الاستمرار؟',
icon: 'question',
iconHtml: '؟',
confirmButtonText: 'نعم',
cancelButtonText: 'لا',
showCancelButton: true,
showCloseButton: true
})
xxxxxxxxxx
Swal.fire({
title: 'Custom animation with Animate.css',
showClass: {
popup: 'animate__animated animate__fadeInDown'
},
hideClass: {
popup: 'animate__animated animate__fadeOutUp'
}
})
xxxxxxxxxx
swal("This modal will disappear soon!", {
buttons: false,
timer: 3000,
});