Directory

← Back

Toastr Vaadin

Toastr Javascript Addon

Author

Rating

Popularity

<100

Vaadin integration to provide a non-blocking notifications framework based on the Toastr Javascript component (https://codeseven.github.io/toastr/)

Bugs Please report any bugs in the github issue-tracker

See the demo application in the source code for full usage.

This component does not require widgetset compilation. It should work with most browsers although hasn't been tested.

Sample code

Toastr toastr = new Toastr();
addComponent(toastr);

toastr.info("Hello World");
toastr.warning("Bad Things", "A bad thing may have happened.");
toastr.success("Yay!");

toastr.error("Error!", "An error has occurred", ToastPosition.Top_Full_Width);
Toastr toastr = new Toastr();
addComponent(toastr);

toastr.registerToastrListener(new ToastrListenerAdapter() {
    @Override
    public void onShown() {
        // Shown event
    }
});
Toastr toastr = new Toastr();
addComponent(toastr);

Toast toast = ToastBuilder.of(ToastType.Info, "This is an informational message")
		.caption("Infomation..")
		.options(ToastOptionsBuilder.having()
					.closeButton(true)
					.debug(false)
					.progressBar(true)
					.preventDuplicates(true)
					.position(ToastPosition.Top_Center)
					.timeOut(2500)
					.build())
		.build()));
toastr.toast(toast);

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

Upgraded jquery-2.1.4 to jquery-3.5.1 to resolve security issues (Thanks to Mika-Oksanen)

Released
2020-05-16
Maturity
BETA
License
MIT License

Compatibility

Framework
Vaadin 8.0+
Browser
Firefox
Google Chrome
Microsoft Edge

Toastr Vaadin - Vaadin Add-on Directory

Toastr Javascript Addon Toastr Vaadin - Vaadin Add-on Directory
Vaadin integration to provide a non-blocking notifications framework based on the Toastr Javascript component (https://codeseven.github.io/toastr/) Bugs Please report any bugs in the github issue-tracker See the demo application in the source code for full usage. This component does not require widgetset compilation. It should work with most browsers although hasn't been tested.
Online