A snippet extention for SweetAlert2
Installation
npm install --save sweetalert2
Or grab from jsdelivr CDN
:
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
Useful Alerts
prefix |
alert |
swbasic |
Simple Sweet Alert |
swsuccess |
Success Sweet Alert |
swquestion |
Question Sweet Alert |
swwarning |
Warning Sweet Alert |
swinfo |
Info Sweet Alert |
swerror |
Error Sweet Alert |
swcustom |
Custom Sweet Alert |
swimage |
Image Sweet Alert |
swhtml |
Html Sweet Alert |
swthreebtn |
Three Button Sweet Alert |
swpos |
Custom Position Sweet Alert |
swanimate |
Animated Sweet Alert |
swconfirm |
Confirm Sweet Alert |
swimagein |
Image inside Sweet Alert |
swcool |
Custom Cool Sweet Alert |
swautoclose |
Auto Close Sweet Alert |
swrtl |
RTL Sweet Alert |
swajax |
Ajax Sweet Alert |
swtoast |
Toast Sweet Alert |
prefix |
alert |
swinput, swprompt |
Input/Prompt Data Sweet Alert |
swinput.select |
Select Data from Dropdown Sweet Alert |
swinput.radio |
Select Data from Radio Sweet Alert |
swinput.checbox |
Checkbox Sweet Alert |
swinput.file, swinput.image |
Choose image/file Sweet Alert |
swinput.range |
Range input Sweet Alert |
swinput.multiple, swinputmultiple |
Multiple input Sweet Alert |
prefix |
Tag |
sw-template, <template> |
Template Tag Sweet Alert |
sw-title, <swal-title> |
Title Tag Sweet Alert |
sw-html, <swal-html> |
HTML Tag Sweet Alert |
sw-footer, <swal-footer> |
Footer Tag Sweet Alert |
sw-param, <swal-param> |
Param Tag Sweet Alert |
sw-button, <swal-button> |
Button Tag Sweet Alert |
sw-image, <swal-image> |
Image Tag Sweet Alert |
sw-icon, <swal-icon> |
Icon Tag Sweet Alert |
sw-input, <swal-input> |
Input Tag Sweet Alert |
sw-input-option, <swal-option> |
Input-Option Tag Sweet Alert |
Methods
prefix |
Method |
Swal.bindClickHandler() |
Swal.bindClickHandler() |
Swal.mixin() |
Swal.mixin() |
Swal.isVisible() |
Swal.isVisible() |
Swal.update() |
Swal.update() |
Swal.close() |
Swal.close() |
Swal.getContainer() |
Swal.getContainer() |
Swal.getTitle() |
Swal.getTitle() |
Swal.getProgressSteps() |
Swal.getProgressSteps() |
Swal.getCloseButton() |
Swal.getCloseButton() |
Swal.getIcon() |
Swal.getIcon() |
Swal.getHtmlContainer() |
Swal.getHtmlContainer() |
Swal.getImage() |
Swal.getImage() |
Swal.getActions() |
Swal.getActions() |
Swal.getFooter() |
Swal.getFooter() |
Swal.getFocusableElements() |
Swal.getFocusableElements() |
Swal.getConfirmButton() |
Swal.getConfirmButton() |
Swal.getDenyButton() |
Swal.getDenyButton() |
Swal.getCancelButton() |
Swal.getCancelButton() |
Swal.enableButtons() |
Swal.enableButtons() |
Swal.disableButtons() |
Swal.disableButtons() |
Swal.showLoading() |
Swal.showLoading() |
Swal.hideLoading() |
Swal.hideLoading() |
Swal.isLoading() |
Swal.isLoading() |
Swal.getTimerLeft() |
Swal.getTimerLeft() |
Swal.stopTimer() |
Swal.stopTimer() |
Swal.resumeTimer() |
Swal.resumeTimer() |
Swal.toggleTimer() |
Swal.toggleTimer() |
Swal.isTimerRunning() |
Swal.isTimerRunning() |
Swal.increaseTimer(n) |
Swal.increaseTimer(n) |
Swal.clickConfirm() |
Swal.clickConfirm() |
Swal.clickDeny() |
Swal.clickDeny() |
Swal.clickCancel() |
Swal.clickCancel() |
Swal.getInput() |
Swal.getInput() |
Swal.disableInput() |
Swal.disableInput() |
Swal.enableInput() |
Swal.enableInput() |
Swal.showValidationMessage() |
Swal.showValidationMessage() |
Swal.resetValidationMessage() |
Swal.resetValidationMessage() |
Swal.getValidationMessage() |
Swal.getValidationMessage() |
Swal.isValidParameter() |
Swal.isValidParameter() |
Swal.isUpdatableParameter() |
Swal.isUpdatableParameter() |
Note:
This is un-offical snippet developed by Rohit Chouhan
Contact: me@rohitchouhan.com
| |