Support for Dynamic Theme and PWA config

is it currently possible to define the theme to use and the PWA name in a dynamic manner?

Use-case: I would like to deploy my web app with different branding (otherwise identical).

As far as I know it is required to be configured the following way:

  name = Whitelabel.BRAND_1,
  shortName = Whitelabel.BRAND_1,
  iconPath = "icons/" + Whitelabel.BRAND_1 + ".png"
public class AppShell extends AbstractAppShell implements AppShellConfigurator,VaadinServiceInitListener {

    public void serviceInit(ServiceInitEvent serviceInitEvent) {

Unfortunately it is also required to use constants as parameters so smth like this is not possible:


My guess is that this is required due to how Vaadin currently gets compiled.

Theme is not possible and you have to work with different variants - PWA no idea, never used

that’s right. The recommended approach for dynamically applied themes is to have a base theme that you load with @Theme and then load additional stylesheets dynamically.

Are there any plans to add such a functionality?
Could also image this to be a Gradle/Maven build parameter.

My current (ugly) approach is to overwrite the file via bash comments in the CI pipeline and then build the second (“BRAND_2”) version. However this feels super hacky.

Issue to upvote: