Interface HasSuffix

All Superinterfaces:
com.vaadin.flow.component.HasElement, Serializable

public interface HasSuffix extends com.vaadin.flow.component.HasElement
Mixin interface for components that have a suffix slot.
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.vaadin.flow.component.Component
    Gets the component in the suffix slot of this field.
    default void
    setSuffixComponent(com.vaadin.flow.component.Component component)
    Adds the given component into this field after the content, replacing any existing suffix component.

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement
  • Method Details

    • setSuffixComponent

      default void setSuffixComponent(com.vaadin.flow.component.Component component)
      Adds the given component into this field after the content, replacing any existing suffix component.

      This is most commonly used to add a simple icon or static text into the field.

      Parameters:
      component - the component to set, can be null to remove existing suffix component
    • getSuffixComponent

      default com.vaadin.flow.component.Component getSuffixComponent()
      Gets the component in the suffix slot of this field.
      Returns:
      the suffix component of this field, or null if no suffix component has been set
      See Also:
      • #setPrefixComponent(Component)