Performance
Bundle inventory, loading strategies, budget policy, and service worker caching.
Architecture Overview
Vanilla Breeze uses a modular loading architecture. Instead of shipping one monolithic bundle, the framework splits into focused layers that load on demand:
Core CSS + Core JS ← every page (88 KB gzip)
├── Extras JS ← on demand (niche components)
├── Theme CSS ← on demand (one at a time)
├── Charts CSS ← on demand (data viz pages)
├── Dev CSS + Dev JS ← on demand (debug only)
└── Service Worker ← opt-in caching layer
Full CSS + Full JS ← backwards-compat single bundle
The core bundles contain the base styles, layout primitives, native element styles, custom elements, and essential web components. The full bundles include everything (all themes, all components) for zero-config setups.
Bundle Inventory
Every CDN artifact with raw, gzip, and brotli sizes. Data from the latest build.
| Artifact | Raw | Gzip | Brotli | Budget | Status |
|---|---|---|---|---|---|
doc-extras.js |
138.5 KB | 37.1 KB | 30.6 KB | -- | -- |
emoji-extended.js |
95.9 KB | 22.8 KB | 18.6 KB | -- | -- |
sw.js |
1.4 KB | 0.7 KB | 0.6 KB | 1.5 KB | OK |
vanilla-breeze-autoload.js |
178.9 KB | 46.4 KB | 38.1 KB | -- | -- |
vanilla-breeze-charts.css |
20.6 KB | 3.3 KB | 2.8 KB | 4.9 KB | OK |
vanilla-breeze-core.css |
268.1 KB | 42.9 KB | 34.8 KB | 46.9 KB | OK |
vanilla-breeze-core.js |
177.4 KB | 45.9 KB | 37.8 KB | 48.8 KB | OK |
vanilla-breeze-dev.css |
12 KB | 2.3 KB | 1.9 KB | 2.9 KB | OK |
vanilla-breeze-dev.js |
2.2 KB | 1 KB | 0.9 KB | 2 KB | OK |
vanilla-breeze-extras.js |
91.2 KB | 25.8 KB | 22.1 KB | 28.3 KB | OK |
vanilla-breeze-labs.css |
5.2 KB | 1.5 KB | 1.4 KB | -- | -- |
vanilla-breeze-labs.js |
2.2 KB | 0.9 KB | 0.8 KB | -- | -- |
vanilla-breeze.css |
568.3 KB | 82.4 KB | 63.1 KB | 87.9 KB | OK |
vanilla-breeze.js |
267.2 KB | 69.9 KB | 57 KB | 74.2 KB | OK |
| Total | 2302 KB | 524.7 KB | 431.2 KB |
Theme sizes
| Theme | Gzip | Brotli |
|---|---|---|
themes/8bit.css |
2.2 KB | 1.9 KB |
themes/amber.css |
0.3 KB | 0.3 KB |
themes/art-deco.css |
1.7 KB | 1.4 KB |
themes/bauhaus.css |
2 KB | 1.6 KB |
themes/brutalist.css |
1.5 KB | 1.3 KB |
themes/catppuccin-frappe.css |
1.7 KB | 1.4 KB |
themes/catppuccin-latte.css |
1.7 KB | 1.4 KB |
themes/catppuccin-macchiato.css |
1.7 KB | 1.4 KB |
themes/catppuccin-mocha.css |
1.5 KB | 1.2 KB |
themes/classic.css |
0.7 KB | 0.6 KB |
themes/claymorphism.css |
2.2 KB | 1.9 KB |
themes/clinical.css |
1.5 KB | 1.2 KB |
themes/coral.css |
0.3 KB | 0.3 KB |
themes/cottagecore.css |
2.2 KB | 1.9 KB |
themes/cyber.css |
1.9 KB | 1.6 KB |
themes/dawn.css |
1.7 KB | 1.5 KB |
themes/dracula.css |
1.4 KB | 1.2 KB |
themes/dusk.css |
1.5 KB | 1.2 KB |
themes/editorial.css |
1.5 KB | 1.3 KB |
themes/emerald.css |
0.3 KB | 0.3 KB |
themes/financial.css |
1.7 KB | 1.4 KB |
themes/forest.css |
0.3 KB | 0.3 KB |
themes/genai.css |
2 KB | 1.6 KB |
themes/glassmorphism.css |
1.7 KB | 1.4 KB |
themes/government.css |
1.5 KB | 1.3 KB |
themes/gruvbox.css |
1.5 KB | 1.2 KB |
themes/high-noon.css |
1.4 KB | 1.2 KB |
themes/indigo.css |
0.3 KB | 0.3 KB |
themes/kawaii.css |
2.4 KB | 2.1 KB |
themes/lavender.css |
0.3 KB | 0.3 KB |
themes/memphis.css |
1.9 KB | 1.6 KB |
themes/midnight.css |
1.4 KB | 1.2 KB |
themes/minimal.css |
0.7 KB | 0.6 KB |
themes/modern.css |
0.7 KB | 0.6 KB |
themes/nes.css |
2.6 KB | 2.2 KB |
themes/neumorphism.css |
2 KB | 1.7 KB |
themes/nord.css |
1.4 KB | 1.2 KB |
themes/ocean.css |
0.3 KB | 0.3 KB |
themes/organic.css |
1.9 KB | 1.6 KB |
themes/rose-pine.css |
1.5 KB | 1.2 KB |
themes/rose.css |
0.3 KB | 0.3 KB |
themes/rough.css |
2.8 KB | 2.4 KB |
themes/slate.css |
0.3 KB | 0.3 KB |
themes/solarized.css |
1.3 KB | 1.1 KB |
themes/startup.css |
1.8 KB | 1.5 KB |
themes/sunset.css |
0.3 KB | 0.3 KB |
themes/swiss.css |
1.2 KB | 1 KB |
themes/terminal.css |
2 KB | 1.7 KB |
themes/tokyo-night.css |
1.5 KB | 1.2 KB |
themes/vaporwave.css |
2.1 KB | 1.7 KB |
themes/win9x.css |
3.1 KB | 2.7 KB |
Individual component sizes
| Component | Gzip | Brotli |
|---|---|---|
components/accordion-wc.js |
1 KB | 0.8 KB |
components/card-list.js |
1.3 KB | 1.1 KB |
components/carousel-wc.js |
1.9 KB | 1.7 KB |
components/color-palette-wc.js |
1 KB | 0.9 KB |
components/combo-box.js |
2.8 KB | 2.4 KB |
components/command-palette.js |
2.5 KB | 2.2 KB |
components/compare-surface.js |
0.7 KB | 0.6 KB |
components/content-swap.js |
1 KB | 0.9 KB |
components/context-menu.js |
2 KB | 1.7 KB |
components/data-table.js |
2.5 KB | 2.2 KB |
components/drag-surface.js |
2.2 KB | 2 KB |
components/drop-down.js |
1.6 KB | 1.4 KB |
components/emoji-picker.js |
8.2 KB | 7 KB |
components/foot-notes.js |
0.9 KB | 0.7 KB |
components/geo-map.js |
5.2 KB | 4.5 KB |
components/heading-links.js |
1 KB | 0.8 KB |
components/icon-wc.js |
1.4 KB | 1.2 KB |
components/include-file.js |
0.8 KB | 0.6 KB |
components/page-toc.js |
1.5 KB | 1.3 KB |
components/qr-code.js |
2.4 KB | 2.1 KB |
components/settings-panel.js |
7.1 KB | 6.2 KB |
components/short-cuts.js |
1.3 KB | 1.1 KB |
components/site-search.js |
2.5 KB | 2.1 KB |
components/slide-accept.js |
1.1 KB | 0.9 KB |
components/split-surface.js |
1.2 KB | 1 KB |
components/star-rating.js |
1.3 KB | 1.1 KB |
components/tabs-wc.js |
1 KB | 0.9 KB |
components/theme-picker.js |
6.6 KB | 5.8 KB |
components/toast-wc.js |
1 KB | 0.8 KB |
components/tool-tip.js |
1.6 KB | 1.4 KB |
components/type-specimen-wc.js |
0.9 KB | 0.8 KB |
Loading Strategies
Core only (recommended)
The smallest footprint. Includes base styles, layout, native element styles, and core web components.
<link rel="stylesheet" href="/cdn/vanilla-breeze-core.css">
<script type="module" src="/cdn/vanilla-breeze-core.js"></script>
Core + Extras
Adds niche components (emoji picker, geo map, data table, etc.) as a separate bundle.
<link rel="stylesheet" href="/cdn/vanilla-breeze-core.css">
<script type="module" src="/cdn/vanilla-breeze-core.js"></script>
<script type="module" src="/cdn/vanilla-breeze-extras.js"></script>
Full bundle
Everything in one file. Simplest to set up, largest download.
<link rel="stylesheet" href="/cdn/vanilla-breeze.css">
<script type="module" src="/cdn/vanilla-breeze.js"></script>
Autoloader
Only loads components as they appear in the DOM. Best for pages that use few components.
<link rel="stylesheet" href="/cdn/vanilla-breeze-core.css">
<script type="module" src="/cdn/vanilla-breeze-autoload.js"></script>
Add-ons
Charts, dev tools, and themes are loaded separately when needed.
<!-- Charts (data visualization) -->
<link rel="stylesheet" href="/cdn/vanilla-breeze-charts.css">
<!-- Dev tools (debug overlays, wireframe) -->
<link rel="stylesheet" href="/cdn/vanilla-breeze-dev.css">
<script type="module" src="/cdn/vanilla-breeze-dev.js"></script>
<!-- Individual theme -->
<link rel="stylesheet" href="/cdn/themes/ocean.css">
Budget Policy
Every CDN artifact has a gzip size budget defined in scripts/bundle-budget.config.json. The npm run budget script checks all artifacts against their budgets and fails with exit code 1 if any are exceeded.
This check runs in CI as part of the quality gate, blocking deployment if bundle sizes regress beyond their budgets.
Current budgets
- Core CSS
- 48 KB gzip
- Core JS
- 50 KB gzip
- Full CSS
- 90 KB gzip
- Full JS
- 76 KB gzip
- Extras JS
- 29 KB gzip
- Individual themes
- 4 KB gzip each
- Individual components
- 10 KB gzip each
Service Worker
Vanilla Breeze includes an opt-in service worker for offline caching. It uses stale-while-revalidate for theme CSS and optional modules, and precaches core bundles on install.
Opt in
Add a meta tag to enable caching:
<meta name="vb-service-worker" content="true">
Or set a global flag before importing:
<script>window.__VB_SERVICE_WORKER = true;</script>
<script type="module" src="/cdn/vanilla-breeze-core.js"></script>
Cache versioning
The service worker names its cache using the build version (e.g., vb-0.1.0). When a new version deploys, the old cache is automatically pruned during activation.
Cache management
The service worker supports a message channel for programmatic cache control:
import { getSWStatus, clearSWCache, checkForUpdate } from 'vanilla-breeze/lib/sw-register.js';
// Get cache status
const status = await getSWStatus();
// { version: '0.1.0', cacheName: 'vb-0.1.0', cachedURLs: [...] }
// Clear all VB caches
await clearSWCache();
// Check for updates
const { updated } = await checkForUpdate();
The settings panel includes a System section with cache management controls when the service worker is active.