Skip to content

Vaadin with Aura

The Aura renderer is the Vaadin renderer themed with Aura, the modern theme Vaadin ships next to Lumo since Vaadin 25: soft surfaces over a tinted app background, the Instrument Sans typeface, one accent colour, light and dark. Everything else is the Vaadin renderer — the same components, the same behaviour, the same accessibility, built from the same sources — so choosing it is a matter of taste, not of features.

Lumo (io.mateu:mateu-vaadin, Mateu’s look on top) and Aura (io.mateu:mateu-vaadin-aura), the same screens of the e2e SUT with nothing changed but the renderer dependency:

LumoAura
A listing with LumoThe same listing with Aura
A form with LumoThe same form with Aura
A wizard with LumoThe same wizard with Aura
A dashboard with LumoThe same dashboard with Aura
A drawer with LumoThe same drawer with Aura
Dark mode with LumoDark mode with Aura

And demo/demo-space (the YAML app every web renderer is shown with), served with -Paura:

The space demo's home with Aura

Use it instead of mateu-vaadin:

<dependency>
<groupId>io.mateu</groupId>
<artifactId>mateu-vaadin-aura</artifactId>
<version>3.0.14</version>
</dependency>
// Gradle
implementation("io.mateu:mateu-vaadin-aura:3.0.14")

and say so in the project descriptor, so the visual editor, Play and a static bundle agree with the served app (the server warns at startup when they differ):

src/main/resources/specs/ui/project.yaml
type: Project
renderer: aura

The New Project wizards (IntelliJ, VS Code, mateu-archetype with -Drenderer=aura) offer it on every Java runtime. It works on every adapter — Spring MVC and WebFlux, Quarkus, Micronaut, Helidon — exactly like mateu-vaadin: the page is the usual Mateu page and the renderer’s files are served from /assets/, under a context path or a proxy prefix too.

A C# server serves it with MapMateu(ui: …) or MATEU_UI pointing at the mateu-vaadin-aura jar (or its static/ folder), a Python one with add_mateu(ui=…). A static bundle (mateu-bundle:bundle) ships it when project.yaml says renderer: aura (or -Dmateu.bundle.renderer=aura), specsOnly included. To serve it from a CDN, upload the jar’s static/ folder — it carries a deployable index.html — see The renderer on a CDN.

Aura is themed with a handful of custom properties, and Mateu’s own components (the listing’s search bar, notices, dashboards, the gantt, the kanban, drawers…) follow them too. Set them on the page and on <mateu-ui>:

html, html mateu-ui, html mateu-ui[theme] {
--aura-accent-color-light: #b4235a; /* the accent, light mode */
--aura-accent-color-dark: #ff6fa3; /* … and dark mode */
--aura-background-color-light: oklch(0.96 0.02 340); /* the app background, tinted */
--aura-base-radius: 8; /* corners (Aura's default is 3) */
--aura-font-family: 'Your Brand Sans', system-ui, sans-serif;
}

The listing above with those tokens

<mateu-ui> needs them too: the renderer re-declares Aura’s tokens on it, so that a page embedding a Mateu app can not repaint it by accident (embedding), and html mateu-ui[theme] is one selector more specific than the renderer’s own rules. Other tokens Aura reads: --aura-base-font-size (14), --aura-base-size (16, the spacing scale), --aura-contrast-level, --aura-background-color-dark. See Vaadin’s Aura documentation for the full list. Lumo’s --lumo-* tokens do not theme this renderer: write a brand for Aura in Aura’s tokens.

@App(themeToggle = true) and the visitor’s system preference work as on Lumo: the page’s theme="dark|light" attribute sets Aura’s CSS colour scheme (color-scheme, which Aura’s light-dark() colours follow), on the page and on <mateu-ui>.

  • The look is Aura as Vaadin ships it. Mateu’s own look for Lumo (outlined fields, slate neutrals, data-mateu-look="classic" to opt out) is a Lumo layer and does not apply here.
  • Aura is denser. Mateu’s own components take their spacing from Aura’s scale, which is tighter than Lumo’s, so a page fits a little more.
  • The visual editor previews an aura project with Lumo for now (its canvas has no Aura mode).
  • Lumo-only styling — --lumo-* overrides, Lumo’s utility classes, @Style values written for Lumo — does not carry over. Re-express it in Aura’s tokens.

The jar is the Vaadin app built a second time (apps/vaadin-aura, vite build --mode aura) with another theme entry. That entry loads @vaadin/aura (Apache-2.0; its Instrument Sans font is under the SIL Open Font License, listed in the jar’s THIRD-PARTY-LICENSES.txt) and gives Aura’s rules to every Mateu element’s shadow root as well as to the page — Aura styles components from the tree they are in, and Mateu draws them inside its own elements. A small bridge declares the --lumo-* names Mateu’s own components read in Aura’s terms. The renderer announces itself as vaadin-aura/<version> in the X-Mateu-Renderer header.

Vaadin and Aura are trademarks of Vaadin Ltd. Mateu is not affiliated with or endorsed by Vaadin; the renderer uses the open-source Vaadin web components and the @vaadin/aura theme under their Apache 2.0 licence.