@Tag(value="iron-icon")
@NpmPackage(value="@polymer/iron-icon",
version="3.0.1")
@JsModule(value="@polymer/iron-icon/iron-icon.js")
public class IronIcon
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.ClickNotifier<IronIcon>
| Constructor and Description |
|---|
IronIcon(String collection,
String icon)
Creates an Icon component that displays the given
icon from the
given collection. |
| Modifier and Type | Method and Description |
|---|---|
String |
getColor()
Gets the fill color of this icon as a String.
|
void |
setColor(String color)
Sets the fill color of the icon.
|
void |
setSize(String size)
Sets the width and the height of the icon.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamepublic void setSize(String size)
The size should be in a format understood by the browser, e.g. "100px" or "2.5em".
size - the size to set, may be null to clear the valuepublic void setColor(String color)
The color should be in a format understood by the browser, e.g. "orange", "#FF9E2C" or "rgb(255, 158, 44)".
color - the fill color to set, may be null to clear the
valuepublic String getColor()
null if the color has
not been setCopyright © 2026. All rights reserved.