Tooltip is a component that can be used in conjunction with any component to display contextual information.

Simple usage
Button button = new Button("Click me");
Tooltip tooltip = new Tooltip();

tooltip.attachToComponent(button);

tooltip.setPosition(TooltipPosition.RIGHT);
tooltip.setAlignment(TooltipAlignment.LEFT);

tooltip.add(new H5("Hello"));
tooltip.add(new Paragraph("This is an example of how to use it"));
// Tooltip should be added to layout as well 
add(button, tooltip);
Manual open/close
Button open = new Button("Open tooltip", event -> {
    tooltip.open();
});

Button close = new Button("Close tooltip", event -> {
    tooltip.close();
});

button.addClickListener(event -> {
   tooltip.setEnabled(!tooltip.isEnabled());
});
// Tooltip should be added to layout as well 
add(open, close, button, tooltip);

Install

Link to this version
StableReleased 10 August 2021Apache License 2.0
Framework Support
Vaadin platform 10+
Install with
Release notes - Version 1.3.7

Add an animation by default when the tooltip is opened/closed