✨ A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. 🇺🇦
MIT License
Bot releases are hidden (Show)
Published by limonte almost 6 years ago
🥇 This release is delivered because of the awesomeness of these people (ordered a-z): @acupajoe, @gverni, @limonte, @toverux, @zenflow
swal(...) -> Swal.fire(...)
- swal({
+ Swal.fire({
...
})
Here's why we did that.
Bower has been deprecated for almost 2 years bower/bower@0bd318d and since then they recommend using Yarn as a package manager:
...psst! While Bower is maintained, we recommend using Yarn and Webpack or Parcel for front-end projects read how to migrate!
Stick to 7.x
if you need Bower support.
setDefaults()
(use mixin()
instead: https://sweetalert2.github.io/#mixin)resetDefaults()
(use mixin()
instead: https://sweetalert2.github.io/#mixin)getButtonsWrapper()
(use getActions()
instead)showValidationError()
(use showValidationMessage()
instead)resetValidationError()
(use resetValidationMessage()
instead)extraParams
useRejections
expectRejections
Stick to 7.x
if you need Android Browser 4.4 support.
https://www.pikapkg.com/packages/?q=sweetalert2
Swal.update({...})
Now, it's possible to update most of popup instance paramters dynamically:
Swal.update({
title: 'Oops, something went rwong',
html: 'Please try again',
type: 'error'
})
Use Swal.isUpdatableParameter(paramName)
to check if a given parameter is updatable.
Swal.close()
will resolve Swal.fire()
's promise with {}
(no value
or dismiss
) (#1379)$swal2-validationerror-*
were renamed to $swal2-validation-message-*
inputValidator
and preConfirm
should always resolve and never reject'backdrop'
, it was 'overlay'
previously for backward compatibility.