SweetAlert2 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!
1 A basic message
|
Try me!
|
2
A title with a text under
|
Try me!
|
3
A modal with a title, an error icon, a text, and a footer
|
Try me!
|
4
A modal window with a long content inside:
|
Try me!
|
5
Custom HTML description and buttons with ARIA labels
|
Try me!
|
6
A custom positioned dialog
|
Try me!
|
7
A confirm dialog, with a function attached to the "Confirm"-button...
|
Try me!
|
8
... and by passing a parameter, you can execute something else for "Cancel".
|
Try me!
|
9
A message with a custom image and CSS animation disabled
|
Try me!
|
10
A message with custom width, padding, background and animated Nyan Cat
|
Try me!
|
11
A message with auto close timer
|
Try me!
|
12
Right-to-left support for Arabic, Hebrew, and other RTL languages
|
Try me!
|
13
AJAX request example
|
Try me!
|
14
Chaining modals (queue) example
|
Try me!
|
15
Dynamic queue example
|
Try me!
|
16
Timer functions example
|
Try me!
|