This module integrates the SweetAlert2 JavaScript library, offering a modern and visually appealing alternative to default JavaScript alert messages. It allows for the display of themed alerts with various customization options.
Integrates the Sweet Alert 2 JavaScript plug-in to a modern replacement for JavaScript's alert with beautiful themed alerts.
Installation
1. Sweetalert2 Depends upon Sweetalert2 library so you have to Download the SweetAlert2 library and save it to /libraries/sweetalert2/sweetalert2.all.js.
Note: In Drupal 10 path will be moved to /libraries/sweetalert2/dist/sweetalert2.all.js
2. after saving it download and enable the SweetAlert2 module.
Examples
See list of available sweetalert2 Examples here.
Usage
Here is the simple syntax that used on JS .
Swal.fire({
icon: 'error',
title: 'Oops...',
text: 'Something went wrong!',
footer: '<a href="">Why do I have this issue?</a>'
})
Ask your assistant about Sweet Alert 2
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
1 tracked project depends on this one
- Popup After Login 61 sites