Annotation Interface DefaultDynamicTheme


@Documented @Inherited @Retention(RUNTIME) @Target(TYPE) public @interface DefaultDynamicTheme
Enables dynamic theme switching with the given theme as the default.

This annotation must be placed on the AppShellConfigurator of the application. It replaces calling DynamicTheme.initialize from configurePage. Since the annotation is read when the application starts, the default theme also applies to sessions that did not load index.html (for instance, after a server restart, or when index.html was served from a cache).

Dynamic theme switching is only available with Vaadin 25+. With older versions this annotation has no effect, so an AppShellConfigurator that runs on several Vaadin versions can be annotated as well. The AppShellConfigurator must not be annotated with the legacy @Theme annotation.

The annotation is ignored if it is placed on a class that is not the AppShellConfigurator of the application. It is inherited by subclasses of the annotated class.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The default theme.
  • Element Details

    • value

      The default theme.
      Returns:
      the default theme