Documentation versions (currently viewingVaadin 10)



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.

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

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

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