Documentation versions (currently viewingVaadin 24)

Parent Themes & Sub-Themes

Configuring parent themes, as well as sub-themes.

Multiple themes can be combined in the same application by configuring one of them as a parent theme to the other. This is typically used for sharing a common base theme (packaged as a JAR dependency) across multiple applications, and loading application-specific themes on top of the base theme.

A theme is configured as a parent theme through the parent property in the theme configuration file theme.json in the application’s theme folder:

  "parent": "my-base-theme"
public class Application implements AppShellConfigurator {

In the example above, my-base-theme is loaded as the parent theme, and my-application-theme is loaded on top of it.

It’s also possible to load additional stylesheets dynamically on top of the application theme.