Icon

Overview

Icon is for displaying an icon from vaadin-icons or another icon collection (see iron-iconset-svg).

Using Icon

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

Java

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

You can also create an Icon from other collections, e.g.

Java

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