Class Icon

All Implemented Interfaces:
ElementAttributeMethods<HTMLElement, Icon>, ElementClassListMethods<HTMLElement, Icon>, ElementConsumerMethods<HTMLElement, Icon>, ElementContainerMethods<HTMLElement, Icon>, ElementEventMethods<HTMLElement, Icon>, ElementIdMethods<HTMLElement, Icon>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, Icon>, HTMLElementDataMethods<HTMLElement, Icon>, HTMLElementStyleMethods<HTMLElement, Icon>, HTMLElementVisibilityMethods<HTMLElement, Icon>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, Icon>, Component, ComponentProgress<HTMLElement, Icon>, org.patternfly.core.OuiaSupport<HTMLElement, Icon>, org.patternfly.style.Modifiers.Inline<HTMLElement, Icon>

public class Icon extends BaseComponent<HTMLElement, Icon> implements org.patternfly.style.Modifiers.Inline<HTMLElement, Icon>, ComponentProgress<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(org.patternfly.icon.PredefinedIcon icon)
      Factory method to create a new instance of this component.
    • icon

      public static Icon icon(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(org.patternfly.style.Status status)
    • progress

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

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