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.

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

  • upgrade sweet alert to v11.4.29
  • upgrade Vaadin to v23.1.7
Released
2022-09-03
Maturity
STABLE
License
MIT License

Compatibility

Framework
Vaadin 23+
Vaadin 14+ in 1.2.1
Browser
Firefox
Opera
Safari
Google Chrome
iOS Browser
Android Browser
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. 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