SweetAlert2Vaadin
Sweet Alert 2 on Vaadin, fully customisable popups dialog
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()); });
Links
Compatibility
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