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.

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

You can also use an Icon from another collection.

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

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