Interface HasThemeVariant<TVariantEnum extends ThemeVariant>

  • Type Parameters:
    TVariantEnum - The specific theme variant enum type
    All Superinterfaces:
    com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasTheme, Serializable

    public interface HasThemeVariant<TVariantEnum extends ThemeVariant>
    extends com.vaadin.flow.component.HasTheme
    Mixin interface that allows adding and removing typed theme variants to / from a component
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void addThemeVariants​(TVariantEnum... variants)
      Adds theme variants to the component.
      default void removeThemeVariants​(TVariantEnum... variants)
      Removes theme variants from the component.
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasTheme

        addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
    • Method Detail

      • addThemeVariants

        default void addThemeVariants​(TVariantEnum... variants)
        Adds theme variants to the component.
        Parameters:
        variants - theme variants to add
      • removeThemeVariants

        default void removeThemeVariants​(TVariantEnum... variants)
        Removes theme variants from the component.
        Parameters:
        variants - theme variants to remove