Directory

← Back

SweetAlert2Vaadin

Sweet Alert 2 on Vaadin, fully customisable popups dialog

Author

Rating

Popularity

100+

An integration with sweet alert 2, which is a beautiful, responsive, customizable, accessible(wai-aria) replacement for javascript's popup boxes.

  • Compiled by Java 11.
  • From Vaadin 23, the component is compiled by Java 17.
  • From Vaadin 24, the component is compiled by Java 21.

Your donation will make the addon much better, thanks for all your support.

Sample code

Config config = new Config();
config.setTitle("Error!!!");
config.setText("Something went wrong.");
config.setIcon("error");
config.setFooter("<a href>Why do I have this issue?</a>");
new SweetAlert2Vaadin(config).open();
sweetAlert2Vaadin.addConfirmListener(e->{
    System.out.println("confirm result : "+e.getSource().getSweetAlert2Result());
});
sweetAlert2Vaadin.addCancelListener(e->{
    System.out.println("cancel result : "+e.getSource().getSweetAlert2Result());
});
sweetAlert2Vaadin.addCloseListener(e->{
    System.out.println("close result : "+e.getSource().getSweetAlert2Result());
});
sweetAlert2Vaadin.addDenyListener(e->{
    System.out.println("deny result : "+e.getSource().getSweetAlert2Result());
});

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • Update Vaadin to v24.5.0
  • Update sweetalert2 to v11.14.3
Released
2024-10-27
Maturity
EXPERIMENTAL
License
MIT License

Compatibility

Framework
Vaadin 24.4+
Vaadin 14+ in 1.0.0
Vaadin 23+ in 2.0.0
Browser
Firefox
Opera
Safari
Google Chrome
Microsoft Edge

SweetAlert2Vaadin - Vaadin Add-on Directory

Sweet Alert 2 on Vaadin, fully customisable popups dialog SweetAlert2Vaadin - Vaadin Add-on Directory
An integration with [sweet alert 2](https://sweetalert2.github.io/), which is a beautiful, responsive, customizable, accessible(wai-aria) replacement for javascript's popup boxes. * Compiled by Java 11. * From Vaadin 23, the component is compiled by Java 17. * From Vaadin 24, the component is compiled by Java 21. Your [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6H3YAQCWHMM4&source=url) will make the addon much better, thanks for all your support.
Online Demo

SweetAlert2Vaadin version 1.0.0
* Vaadin v14.4.8 * Sweet Alert 2 v10.15.5

SweetAlert2Vaadin version 1.1.0
* Add event to button

SweetAlert2Vaadin version 1.1.1
* Add npm dependency * Upgrade Vaddin to v14.5.2 * Upgrade sweet alert 2 to v10.16.0

SweetAlert2Vaadin version 1.2.0
* Upgrade Vaadin to v14.6.1 * Add close & update implementation * Change the way of custom css settings

SweetAlert2Vaadin version 1.2.1
* bug fixes * Vaadin upgrade to v18.4 * sweet alert upgrade to v11.4.4

SweetAlert2Vaadin version 2.0.0
* upgrade sweet alert to v11.4.29 * upgrade Vaadin to v23.1.7

SweetAlert2Vaadin version 3.0.0
* Update Vaadin to v24.5.0 * Update sweetalert2 to v11.14.3

Online