Class Icon

java.lang.Object
org.patternfly.component.BaseComponent<elemental2.dom.HTMLElement, Icon>
org.patternfly.component.icon.Icon
All Implemented Interfaces:
ElementAttributeMethods<elemental2.dom.HTMLElement, Icon>, ElementClassListMethods<elemental2.dom.HTMLElement, Icon>, ElementConsumerMethods<elemental2.dom.HTMLElement, Icon>, ElementContainerMethods<elemental2.dom.HTMLElement, Icon>, ElementEventMethods<elemental2.dom.HTMLElement, Icon>, ElementIdMethods<elemental2.dom.HTMLElement, Icon>, ElementQueryMethods<elemental2.dom.HTMLElement>, HTMLElementAttributeMethods<elemental2.dom.HTMLElement, Icon>, HTMLElementDataMethods<elemental2.dom.HTMLElement, Icon>, HTMLElementStyleMethods<elemental2.dom.HTMLElement, Icon>, HTMLElementVisibilityMethods<elemental2.dom.HTMLElement, Icon>, IsElement<elemental2.dom.HTMLElement>, TypedBuilder<elemental2.dom.HTMLElement, Icon>, Component, ComponentProgress<elemental2.dom.HTMLElement, Icon>, OuiaSupport<elemental2.dom.HTMLElement, Icon>, Modifiers.Inline<elemental2.dom.HTMLElement, Icon>

public class Icon extends BaseComponent<elemental2.dom.HTMLElement, Icon> implements Modifiers.Inline<elemental2.dom.HTMLElement, Icon>, ComponentProgress<elemental2.dom.HTMLElement, Icon>
An icon component is a container that allows for icons of varying dimensions, as well as spinners, to seamlessly replace each other without shifting surrounding content.

icon(check());
icon(filter())
        .size(IconSize.lg);
icon(triangleExclamation())
        .inline()
        .status(warning);
See Also:
  • Method Details

    • icon

      public static Icon icon(PredefinedIcon icon)
      Factory method to create a new instance of this component.
    • icon

      public static Icon icon(elemental2.dom.Element icon)
      Factory method to create a new instance of this component.
    • size

      public Icon size(IconSize size)
      Size of the icon component container and icon.
    • iconSize

      public Icon iconSize(IconSize iconSize)
      Size of icon. Overrides the icon size set by the size property.
    • progressIconSize

      public Icon progressIconSize(IconSize progressIconSize)
      Size of progress icon. Overrides the icon size set by the size(IconSize) property.
    • status

      public Icon status(Status status)
    • progress

      public Icon progress(boolean inProgress, String label, Consumer<Spinner> spinnerConsumer)
      Specified by:
      progress in interface ComponentProgress<elemental2.dom.HTMLElement, Icon>
    • that

      public Icon that()
      Specified by:
      that in interface TypedBuilder<elemental2.dom.HTMLElement, Icon>