From vaadin-claude
Generate and customize Vaadin Aura theme CSS configurations from free-form descriptions. Adjust colors, typography, density, and other visual design properties.
npx claudepluginhub vaadin/claude-plugin --plugin vaadin-claudeThis skill uses the workspace's default tool permissions.
Generate Vaadin Aura theme CSS files from free-form descriptions.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Generate Vaadin Aura theme CSS files from free-form descriptions.
/src/main/resources/META-INF/resources/styles.css)@import statement to styles.css to import the new theme fileFinding styles.css:
/src/main/resources/META-INF/resources/styles.css**/styles.css in the workspaceCreating the theme file:
Integrating the theme:
@import "filename.css"; at the top of styles.css (where filename.css is the name of the generated theme file)Map user intent to Aura properties:
| User says | Property to set |
|---|---|
| dark mode, dark theme | color-scheme: dark |
| light mode | color-scheme: light |
| auto/system theme | color-scheme: light dark |
| mixed mode, dark nav | color-scheme: dark + --aura-content-color-scheme: light |
| color name as accent (e.g., "emerald", "sky") | --aura-accent-color-light + --aura-accent-color-dark |
| colorful, vibrant, saturated background | Use Accent background (oklch-derived from accent color) |
| warm/earthy background | Stone, Taupe, or Olive backgrounds |
| cool background | Slate, Mist, or Zinc backgrounds |
| neutral/clean | Neutral or White/Black backgrounds |
| muted, desaturated, soft colors | Reduce saturation/chroma across palette colors, user colors, and accents |
| bright, vivid, vibrant colors | Increase saturation/vibrance across palette colors, user colors, and accents |
| specific brand color for errors, warnings, success | Set corresponding palette color (e.g., --aura-red, --aura-green) |
| warmer/cooler neutral tones | Adjust --aura-neutral-light and --aura-neutral-dark |
| compact, dense | --aura-base-size: 12 |
| spacious, roomy | --aura-base-size: 20 |
| sharp, angular, square | --aura-base-radius: 0 |
| slightly rounded | --aura-base-radius: 3 (default, often omitted) |
| rounded, soft | --aura-base-radius: 4 |
| very rounded, pill-shaped | --aura-base-radius: 7 (use sparingly) |
| high contrast, accessible | --aura-contrast-level: 2 |
| subtle, soft contrast | --aura-contrast-level: 0.25 |
| flat, minimal, low surface | --aura-surface-level: -0.5 |
| elevated, layered, card-like | --aura-surface-level: 2 |
| semi-transparent surfaces | --aura-surface-opacity: 0.5 (default) |
| opaque surfaces | --aura-surface-opacity: 1 |
| small text | --aura-base-font-size: 13 |
| large text | --aura-base-font-size: 16 |
| monospace, code-like | Geist Mono, JetBrains Mono, or Atkinson Hyperlegible Mono |
| modern, clean font | Inter, Geist, Public Sans, or Manrope |
| accessible font | Atkinson Hyperlegible Next |
| opaque overlays, solid dialogs | --aura-overlay-surface-opacity: 1 |
| maximized layout, edge-to-edge, no inset, full screen | --aura-app-layout-inset: 0px |
| default layout inset | --aura-app-layout-inset: 1.5vmin (default, omit) |
| allow content area to follow system light/dark | --aura-content-color-scheme: light dark |
| keep notifications always dark | --aura-notification-color-scheme: dark |
| notifications follow system | --aura-notification-color-scheme: light dark |
Component-specific styling (Navigation — separate selectors, very common):
The side nav patterns below appear in most quality themes. Apply them proactively for any polished app theme:
| Pattern | CSS |
|---|---|
| Accent icons on inactive nav items | vaadin-side-nav-item:not([current]) > vaadin-icon { color: var(--aura-accent-text-color); } |
| Current nav item: container background, no border | vaadin-side-nav-item[current]::part(content) { --vaadin-side-nav-item-background: var(--vaadin-background-container); --vaadin-side-nav-item-border-color: transparent; } |
| Nav section labels: uppercase, small, letter-spaced | vaadin-side-nav::part(label) { text-transform: uppercase; font-size: var(--aura-font-size-xs); color: var(--vaadin-text-color); letter-spacing: 0.03em; } |
Component-specific styling (Buttons — separate selector, very common):
This pattern is used in most quality themes to make secondary/default buttons feel neutral rather than accented:
:is(vaadin-button, vaadin-menu-bar-button, vaadin-upload-button):not([theme~="primary"], [theme~="tertiary"]) {
--aura-accent-color-light: var(--aura-neutral);
--aura-accent-color-dark: var(--aura-neutral);
--vaadin-button-background: var(--vaadin-background-container);
--vaadin-button-border-color: transparent;
--vaadin-button-shadow: none;
}
For monochrome/bordered button style (no fill, just border):
html {
--vaadin-button-border-color: var(--vaadin-border-color);
--vaadin-button-shadow: none;
}
:is(vaadin-button, vaadin-menu-bar-button, vaadin-upload-button):not([theme~="primary"]) {
--vaadin-button-background: var(--vaadin-background-container);
}
Component-specific styling (Font weights — separate html block):
For fonts with multiple weights (e.g., Manrope), adjust the weight scale for a heavier, more polished feel:
html {
--aura-font-weight-regular: 500;
--aura-font-weight-medium: 600;
--aura-font-weight-semibold: 700;
--vaadin-button-font-weight: 600;
--vaadin-input-field-value-font-weight: 500;
--vaadin-checkbox-font-weight: 600;
--vaadin-radio-button-font-weight: 600;
--vaadin-message-name-font-weight: 600;
--vaadin-grid-header-font-weight: 600;
}
Component-specific styling (Cards/Widgets — separate selector):
When a theme uses low global surface level but needs elevated cards:
vaadin-card,
vaadin-dashboard-widget {
--aura-surface-level: 4;
}
Component-specific styling (Input Fields — applied on html):
| User says | Property to set |
|---|---|
| customize input field appearance, borders, or background | Input field properties (--vaadin-input-field-background, --vaadin-input-field-border-*) |
| secondary accent for focus indicators | Focus ring color (--vaadin-focus-ring-color) |
Component-specific styling (User Colors — applied on html):
| User says | Property to set |
|---|---|
| customize avatar colors or chart palette | User color properties (--vaadin-user-color-0 through --vaadin-user-color-9) |
| branded color palette for data visualization | Define all 10 user colors to match brand guidelines |
Component-specific styling (Grid — separate selector):
| User says | Property to set |
|---|---|
| customize grid borders, background, or corners | Grid container properties (--vaadin-grid-background, --vaadin-grid-border-*, --vaadin-grid-border-radius) |
| add/adjust row or column borders in grid | Grid structure properties (--vaadin-grid-row-border-width, --vaadin-grid-column-border-width) |
| customize grid header appearance | Grid header properties (--vaadin-grid-header-font-size, --vaadin-grid-header-font-weight, --vaadin-grid-header-text-color) |
| set grid row backgrounds or stripes | Grid row properties (--vaadin-grid-row-background-color, --vaadin-grid-row-odd-background-color) |
Important considerations:
--aura-base-radius: 7 is very rounded — only use when explicitly requested.--aura-red, --aura-green, etc.) to match the overall style (muted, bright, brand-specific). Keep color hues consistent (red stays red-ish, green stays green-ish) but adjust tone/saturation. Text colors are automatically derived.--vaadin-user-color-*) to match the overall style for consistent visual appearance in avatars and charts.--aura-surface-level: -0.5 (flat) is common in modern themes. Pair with card elevation scoping when needed.--aura-content-color-scheme: light dark allows the content area to follow the system preference, commonly combined with a fixed dark or light color-scheme for the nav.0px not 0). This is required for CSS calc() functions.@import for fonts using the exact URL from the curated font list when a custom font family is set.html selector. Additional component token overrides that apply globally may use a second html {} block.color-scheme on html when not using the default (light).0px not 0).--aura-surface-level to vaadin-card, vaadin-dashboard-widget when the global surface level is flat (-0.5) but cards need to stand out.Name the output CSS file descriptively based on its configuration. Patterns:
{accent}-{background}.css — e.g., emerald-zinc.css, sky-neutral.css{accent}-{density}-{font}.css — when density or font is distinctive@import url('https://fonts.googleapis.com/css2?family=FONT_NAME:wght@RANGE&display=swap');
/* Core Aura configuration */
html {
color-scheme: VALUE;
--aura-accent-color-dark: VALUE;
--aura-accent-color-light: VALUE;
--aura-app-layout-inset: VALUE;
--aura-background-color-dark: VALUE;
--aura-background-color-light: VALUE;
--aura-base-font-size: VALUE;
--aura-base-radius: VALUE;
--aura-base-size: VALUE;
--aura-content-color-scheme: VALUE;
--aura-contrast-level: VALUE;
--aura-font-family: VALUE;
--aura-notification-color-scheme: VALUE;
--aura-overlay-surface-opacity: VALUE;
--aura-surface-level: VALUE;
--aura-surface-opacity: VALUE;
/* palette colors only when needed */
--aura-blue: VALUE;
--aura-green: VALUE;
--aura-neutral-dark: VALUE;
--aura-neutral-light: VALUE;
--aura-orange: VALUE;
--aura-purple: VALUE;
--aura-red: VALUE;
--aura-yellow: VALUE;
}
/* Side nav styling (include for most app themes) */
vaadin-side-nav-item:not([current]) > vaadin-icon {
color: var(--aura-accent-text-color);
}
vaadin-side-nav-item[current]::part(content) {
--vaadin-side-nav-item-background: var(--vaadin-background-container);
--vaadin-side-nav-item-border-color: transparent;
}
vaadin-side-nav::part(label) {
text-transform: uppercase;
font-size: var(--aura-font-size-xs);
color: var(--vaadin-text-color);
letter-spacing: 0.03em;
}
/* Button styling — neutral secondary/default buttons (include for most app themes) */
:is(vaadin-button, vaadin-menu-bar-button, vaadin-upload-button):not([theme~="primary"], [theme~="tertiary"]) {
--aura-accent-color-light: var(--aura-neutral);
--aura-accent-color-dark: var(--aura-neutral);
--vaadin-button-background: var(--vaadin-background-container);
--vaadin-button-border-color: transparent;
--vaadin-button-shadow: none;
}
/* Card/widget elevation (include when global surface-level is flat) */
vaadin-card,
vaadin-dashboard-widget {
--aura-surface-level: 4;
}
/* Font weights (include for variable-weight fonts like Manrope) */
html {
--aura-font-weight-regular: VALUE;
--aura-font-weight-medium: VALUE;
--aura-font-weight-semibold: VALUE;
--vaadin-button-font-weight: VALUE;
--vaadin-input-field-value-font-weight: VALUE;
--vaadin-checkbox-font-weight: VALUE;
--vaadin-radio-button-font-weight: VALUE;
--vaadin-message-name-font-weight: VALUE;
--vaadin-grid-header-font-weight: VALUE;
}
/* Input fields (only when explicitly requested) */
html {
--vaadin-focus-ring-color: VALUE;
--vaadin-input-field-background: VALUE;
--vaadin-input-field-border-color: VALUE;
--vaadin-input-field-border-radius: VALUE;
--vaadin-input-field-border-width: VALUE;
}
/* User colors for avatars/charts (only when explicitly requested) */
html {
--vaadin-user-color-0: VALUE;
/* ... through --vaadin-user-color-9 */
}
/* Grid (only when explicitly requested) */
vaadin-grid {
--vaadin-grid-background: VALUE;
--vaadin-grid-border-color: VALUE;
--vaadin-grid-border-radius: VALUE;
--vaadin-grid-border-width: VALUE;
--vaadin-grid-column-border-width: VALUE;
--vaadin-grid-header-font-size: VALUE;
--vaadin-grid-header-font-weight: VALUE;
--vaadin-grid-header-text-color: VALUE;
--vaadin-grid-row-background-color: VALUE;
--vaadin-grid-row-border-width: VALUE;
--vaadin-grid-row-odd-background-color: VALUE;
}
Omit the @import line if no custom font. Omit any property that uses its default value. Sort properties alphabetically within each block. Include only the sections relevant to the generated theme.
Refer to the reference CSS files for full, complete, idiomatic examples — they are the gold standard:
User prompt: "Vibrant and colorful with yellow accents"
html {
--aura-accent-color-dark: #FACC15;
--aura-accent-color-light: #efb100;
--aura-background-color-dark: oklch(from var(--aura-accent-color-dark) 0.18 calc(c * 0.3) h);
--aura-background-color-light: oklch(from var(--aura-accent-color-light) 0.9 calc(c * 0.3) h);
--aura-contrast-level: 2;
}
User prompt: "Use our brand colors: #FF0000 for errors, #00AA00 for success"
html {
--aura-green: #00AA00;
--aura-red: #FF0000;
}
User prompt: "Make the grid have rounded corners, no outer border, and add subtle column dividers"
vaadin-grid {
--vaadin-grid-border-radius: var(--vaadin-radius-m);
--vaadin-grid-border-width: 0;
--vaadin-grid-column-border-width: 1px;
}
User prompt: "Make input fields have a light background with a subtle border and use purple for focus indicators"
html {
--vaadin-focus-ring-color: #9810fa;
--vaadin-input-field-background: var(--vaadin-background-container);
--vaadin-input-field-border-color: var(--vaadin-border-color-subtle);
--vaadin-input-field-border-width: 1px;
}
User prompt: "Use our brand color palette for avatars and charts"
html {
--vaadin-user-color-0: #2E7D32;
--vaadin-user-color-1: #1565C0;
--vaadin-user-color-2: #C62828;
--vaadin-user-color-3: #F57C00;
--vaadin-user-color-4: #7B1FA2;
--vaadin-user-color-5: #00838F;
--vaadin-user-color-6: #558B2F;
--vaadin-user-color-7: #D32F2F;
--vaadin-user-color-8: #1976D2;
--vaadin-user-color-9: #E64A19;
}