r/javascript • u/limonmonte • 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/9
6
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
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
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
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
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