From 2b64c35b79a77540ffdfe177dd6e1cc975272fda Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:06:05 -0300 Subject: [PATCH] docs(readme): document DynamicTheme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index aca8a4a..455555a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,28 @@ By default, help content will be rendered in a `Dialog`. ![image](https://github.com/FlowingCode/CommonsDemo/assets/11554739/055a447e-a104-4ec7-a98c-fc1df8abef01) +## Dynamic Theme + +Available in Vaadin 25+, this feature allows you to verify add-on behavior across the Lumo and Aura themes, as well as with minimal base styles. The theme can be switched at runtime using the theme selector in the footer of the `TabbedDemo` component. + +image + +To enable this feature, the `DynamicTheme` must be initialized in the `AppShellConfigurator` of the application. Ensure that the legacy `@Theme` annotation and any Aura or Lumo `@StyleSheet` references are removed. + +```java +public class AppShellConfiguratorImpl implements AppShellConfigurator { + + @Override + public void configurePage(AppShellSettings settings) { + if (DynamicTheme.isFeatureSupported()) { + DynamicTheme.LUMO.initialize(settings); + } + } + +} +``` + + ## Code Viewer The code viewer component (`SourceCodeViewer`) is responsible of rendering a Java source file along the demo.