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

    Modifier and Type
    Method
    Description
    default void
    Adds theme variants to the component.
    default void
    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 Details

    • 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