Icon

The Icon component allows you to display an icon. You can use icons from Vaadin icons, PolymerElements/iron-iconset-svg or any other set.

Using Icon

Icon is normally used with the default VaadinIcon enumeration which maps all the icons from vaadin-icons.

Example: Creating a Vaadin logo icon.

Java

  1. Icon icon = VaadinIcon.VAADIN_H.create();
  2. new Button("Vaadin", icon);

You can also use an Icon from another collection.

Example: Creating a “clock” icon from the vaadin-lumo-styles collection.

Java

  1. Icon icon = new Icon("lumo", "clock");
  2. new Button("Clock", icon);