@Target(value=TYPE) @Retention(value=RUNTIME) @Inherited @Documented public @interface Theme
The theme allows to define a way to translate base component url to the
themed component url (@see AbstractTheme
), which specifies components
styles.
By default com.vaadin.flow.theme.lumo.Lumo
theme is used if it's in
the classpath. You may disable theming with NoTheme
annotation.
Theme
annotation should be added to your root navigation level,
RouterLayout
or to the top level @Route
.
Here are examples:
@Route(value = "")
@Theme(Lumo.class)
public class Main extends Div {
}
@Theme(MyTheme.class)
public class MainLayout extends Div implements RouterLayout {
}
@Route(value = "editor", layout = MainLayout.class)
public class Editor extends Div {
}
AbstractTheme
,
NoTheme
,
RouterLayout
,
Route
Modifier and Type | Required Element and Description |
---|---|
Class<? extends AbstractTheme> |
value
The theme translation handler.
|
public abstract Class<? extends AbstractTheme> value
public abstract String variant
Copyright © 2019. All rights reserved.