Tobi123 Tobi123 - 1 month ago 5
Javascript Question

Vaadin: Close Notofications by "close", "ok", or "x"?

I'm using Vaadin and everything works fine, but there is one point I'm not happy about:

The notifications ( only show the message, but there is NOTHING which explains the user how to close it. Of course I can close it by clicking on it, but this is not intuitive in my opinion."message part one", "message part two", Type.ERROR_MESSAGE);

Is there a way to enable something like a close- or an ok-button for closing the notification? Or just an x at right top?



You can display an X button.

See Valo Theme Demo, section notifications: use additional style "closable" (ValoTheme.NOTIFICATION_CLOSABLE).

Alternatively you could include text like "(click to close)" into your message.