r/javascript • • Sep 08 '20

SweetAlert2 - a beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes (alert, prompt, dialog, toast, side panel, drawer, etc.)

https://sweetalert2.github.io/
102 Upvotes

17 comments sorted by

12

u/limonmonte Sep 08 '20

The new major release (v10) has been released, the new major feature is three buttons (confirm, deny, cancel) which can be used for dialogs like Save/Don't Save/Cancel

The complete release notes can be found here: https://github.com/sweetalert2/sweetalert2/releases/tag/v10.0.0

7

u/seiyria Sep 08 '20

Ah man, I remember asking for that feature like 6 years ago... but I'm glad it got put in eventually! Still my favorite confirm library.

9

u/AmittOfficial Sep 08 '20

I use this all the time in personal projects i work on and it’s great

6

u/ybPNPMigL7BmD Sep 08 '20 edited Sep 09 '20

What amazes me is there are nsfw sponsors

6

u/Orkaad Sep 09 '20

They are the one who need the most "Are you over 18?" confirmation boxes.

4

u/hiromu666 Sep 08 '20

I used it on a project and have had no issues. It has a really great look to it.

4

u/Mr0010110Fixit Sep 08 '20

I use the heck out of this in hybrid mobile apps. Its amazing

1

u/ejfrodo Sep 08 '20

For all of the demos on my S9+, the dark transparent layer behind the modal seems to be broken. It flashes in a second after the modal appears

1

u/limonmonte Sep 08 '20

Thanks for reporting! What browser are you using?

1

u/ejfrodo Sep 08 '20

It's the embedded chrome webview that apps can use to view web pages. I'm using the reddit sync app in particular

9

u/jakubriedl Sep 08 '20

Looks really good, what is concerning though is bundle size. >18kb (inc. react connector) is probably blocker for us for such a lib, but will keep an eye on it in future.

8

u/illbehereallweek Sep 08 '20

It makes me sad that this comment is getting down voted. I've used SweetAlert in multiple personal projects but it is a bit hefty for the problem it solves. I appreciate that you are paying attention to your bundle size.

2

u/bossinfo Sep 08 '20

This is truly sweet. We can really use this!

2

u/KindaAlwaysVibrating Sep 08 '20

I've used sweetalert1 and 2 in a personal project. 2 gives a lot more customization and has worked really well for me.

1

u/[deleted] Sep 08 '20

I always use this when someone asks for a popup in a project that I don't want to work, nobody ever complained.

1

u/Mr-BovineJoni Sep 08 '20

I’ve used the original SweetAlert and they’ve worked great. Glad to see these improvements.

1

u/lostdutchmanaz Sep 09 '20

Sweetalert is the bee’s knees