Themes

Themes let you customize the look and feel of your site with a single attribute. Choose from color themes that change the palette, or personality themes that transform the entire design.

Using Themes

Apply a theme by adding the data-theme attribute to the <html> element.

Theme Categories

Vanilla Breeze includes three types of themes:

Color Accents

Change the color palette via ThemeManager.setAccent(). Shape, shadows, and typography remain default.

  • Ocean
  • Forest
  • Sunset

Personality Themes

Transform colors, shape, shadows, typography, and motion for distinct design feels.

  • Modern
  • Minimal
  • Classic

Extreme Themes

Dramatic visual transformations for creative projects and artistic expression.

  • Brutalist, Swiss, Cyber, Organic
  • Editorial, Terminal, Kawaii, 8-bit
  • NES, Win9x

Color Accents

Color accents override hue values to change the brand palette. They preserve the default shape, shadows, and typography. Unlike personality themes which use data-theme, accents are applied programmatically via ThemeManager.setAccent().

Dark Mode Support

Add dark mode adjustments for your custom theme:

Personality Theme

For a complete transformation, override shape, shadows, typography, and motion:

Token Reference

Tokens commonly overridden in themes:

Category Tokens
Color Hues--hue-primary, --hue-secondary, --hue-accent
Brand Colors--color-primary, --color-secondary, --color-accent
Surfaces--color-background, --color-surface, --color-surface-raised
Border Radius--radius-s, --radius-m, --radius-l
Shadows--shadow-sm, --shadow-md, --shadow-lg
Typography--font-sans, --font-serif
Motion--duration-normal, --ease-default

Fluid Scaling

Add data-fluid to the <html> element to make type sizes and spacing scale continuously across viewports. Instead of breakpoint jumps, values interpolate smoothly from 320px to 1440px using clamp().

Presets

PresetType RatioSpace SwingCharacter
compact1.067 → 1.2±11%Tight, uniform hierarchy
default1.125 → 1.25±10%Balanced, general-purpose
spacious1.2 → 1.333±11%Generous, dramatic headings

Fluid scaling composes with all themes. The a11y-large-text accessibility theme includes its own fluid compound rules so the larger base sizes also scale fluidly.

For custom fluid parameters, see the Fluid Sizing tool and Theme Composer.

Extensions

Theme extensions are opt-in enhancements that add specialized capabilities beyond the core design tokens. They're included in Vanilla Breeze core but default to minimal/disabled values for progressive adoption.

Available Extensions

Motion Effects

Hover transforms, named easing presets, staggered animations, and enter/exit keyframe animations.

Surfaces

Texture overlays, glassmorphism effects, and gradient presets for backgrounds and cards.

Custom Fonts

Font slots for display, heading, body, and code typography with external font support.

Rough Borders

SVG filter displacement and border-image patterns for sketchy, hand-drawn effects.

Sound Effects

Web Audio API patterns for UI feedback sounds with accessibility controls.

Extension Tokens Reference

All extension tokens can be overridden in custom themes. See src/tokens/themes/_theme-template.css for the full list with documentation.

Extension Key Tokens Default
Motion Effects --motion-hover-lift, --motion-bounce, --motion-stagger-delay Active
Surfaces --glass-blur, --surface-texture-opacity, --gradient-subtle Minimal (blur: 0)
Custom Fonts --font-display, --font-heading, --font-body, --font-code System fonts
Rough Borders --border-roughness, --filter-rough, --shadow-sketch Disabled (0)

Theme Picker Integration

The Theme Builder includes an Extensions panel where you can toggle and customize extension features. Changes are applied in real-time and can be exported as CSS.

Using Extensions in Custom Themes

Override extension tokens in your theme to enable or customize features:

Wireframe Mode

A design iteration overlay that transforms your production markup into wireframe views at multiple fidelity levels. Toggle it on during design review, then turn it off — your HTML stays unchanged.

Fidelity Levels

Level Description Font
loSketch aesthetic — rough, hand-drawn feelRedacted Script
midClean blocks — readable structureFlow Block
hiNear-production — mostly normal with muted chromeSystem font
annotateFull design with visible labels on every labeled elementSystem font

HTML Activation

Labeling Elements

Add contextual labels to any element with data-wf-label. Images auto-use their alt text.

JavaScript API

Rough Borders

Hand-drawn, sketchy border effects using SVG filters and border-image patterns. Great for wireframe themes, organic aesthetics, or playful designs.

Roughness Levels

Three SVG displacement filters provide increasing levels of roughness:

Light

Subtle wobble (scale: 2)

Medium

Sketchy feel (scale: 4)

Heavy

Torn paper effect (scale: 8)

Usage

See the full Rough Borders extension demo for all six techniques including mask edges, gradient borders, and pseudo-element decorations.

Next Steps

Tokens

Complete design token reference.

Attributes

Layout attributes for semantic HTML.

Elements

Browse all styled elements.