Documentation versions (currently viewingVaadin 8)

Vaadin 8 reached End of Life on February 21, 2022. Discover how to make your Vaadin 8 app futureproof →

Changing theme on the fly

Starting from Vaadin 7.3, you can change themes in the application without reloading the page. To do this, simply use the UI.setTheme(String) method.

public class ThemeChangeUI extends UI {

  private String[] themes = { "valo", "reindeer", "runo", "chameleon" };

  protected void init(VaadinRequest request) {
    ComboBox themePicker = new ComboBox("Theme", Arrays.asList(themes));

    themePicker.addValueChangeListener(new ValueChangeListener() {
      public void valueChange(ValueChangeEvent event) {
        String theme = (String) event.getProperty().getValue();


In this way, you can let your users choose the look of your application. The functionality also makes it easier to create applications that are branded for different customers.