Add-on 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);

Discussion

Open Vaadin Forum

Give feedback, share tips and ask questions.

Total 0 posts

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.
Author Homepage
Issue Tracker
Source Code

Toastr Vaadin version 1.0.7
Fixed dependency scopes.

Toastr Vaadin version 1.0.9
Added simple API for common usage.

Toastr Vaadin version 1.0.11
Upgraded jquery-2.1.4 to jquery-3.5.1 to resolve security issues (Thanks to Mika-Oksanen)

Online