License: MIT | HACS: Custom | HA: 2024.1+
Animated canvas ribbon background for Home Assistant dashboards. Adds smooth, flowing ribbon animations behind your HA interface with full GUI configuration.
Based on animation.79.canvas-ribbons from lovelace-bg-animation by @ibz0q, which itself is based on Boris Šehovac's CodePen. Rewritten as a standalone, lightweight HACS plugin with live GUI configuration.
| Version | Type | Description |
|---|---|---|
| 1.x | Major | Single-file HACS plugin with canvas ribbon animation |
| 1.8 | Minor | Auto-preset based on sun position (elevation + rising) |
| 1.7 | Minor | Save & close button (blue, default action) |
| 1.7.1 | Fix | Preset dropdown: dark theme colors, retain selection |
| 1.7.2 | Fix | HACS validation: remove deprecated type field, add topics |
| 1.6 | Minor | 16 presets in 4 categories (Games, Seasons, Time of day, Themes) |
| 1.5 | Minor | Saturation and brightness controls |
| 1.4 | Minor | Hue position+range sliders with rainbow gradient and color preview |
| 1.3 | Minor | i18n: PL, EN, DE, ES, CS with auto-detection |
| 1.2 | Minor | Per-panel enable/disable, security fixes (H1–H4) |
| 1.1 | Minor | GUI configuration panel, localStorage persistence |
| 1.0 | Minor | Initial release — canvas ribbons, HA theme transparency |
- Animated ribbon background rendered on HTML5 Canvas
- GUI configuration panel — click the button in the bottom-right corner
- 16 presets (Pip-Boy, Neon City, seasons, iOS Dark, Material You…)
- 13 configurable parameters (waves, speed, colors, saturation, brightness, transparency)
- Settings persisted to
localStorage - Automatic HA theme transparency (cards, header, sidebar)
- Lightweight (~6 KB), no dependencies
- HACS compatible
- Open HACS → Frontend → Custom repositories
- Add this repository URL, category: Lovelace
- Install Canvas Ribbons Background
- Add resource in Settings → Dashboards → Resources:
- URL:
/hacsfiles/ha-canvas-ribbons/ha-canvas-ribbons.js - Type: JavaScript Module
- URL:
- Refresh browser (Ctrl+Shift+R)
- Copy
dist/ha-canvas-ribbons.jsto your HA/config/www/directory - Add resource in Settings → Dashboards → Resources:
- URL:
/local/ha-canvas-ribbons.js - Type: JavaScript Module
- URL:
- Refresh browser (Ctrl+Shift+R)
Click the floating button in the bottom-right corner to open the settings panel:
| Parameter | Range | Live | Description |
|---|---|---|---|
| Enable on panel | on/off | yes | Enable/disable ribbons per HA panel (stored per URL path) |
| Waves | 1–8 | reload | Number of ribbon waves |
| Trail width | 20–300 | yes | Length of ribbon trail |
| Rotation | 0–360° | yes | Rotation angle |
| Amplitude | 0.1–2.0 | yes | Wave amplitude |
| Speed min/max | 0.001–0.04 | yes | Animation speed range |
| Hue | 0–30 | yes | Color hue position (rainbow slider) |
| Hue range | 0–15 | yes | Color oscillation width |
| Saturation | 0–1 | yes | Color saturation |
| Brightness | 0–1 | yes | Color brightness |
| Card alpha | 0–1 | yes | Card background opacity |
| Header alpha | 0–1 | yes | Header opacity |
| Sidebar alpha | 0–1 | yes | Sidebar opacity |
Settings are saved to localStorage and persist across page reloads. Click Reset to restore defaults.
You can also set config programmatically via window.canvasRibbonsConfig:
<script>
window.canvasRibbonsConfig = {
waves: 3, // number of ribbon waves (default: 3)
width: 120, // ribbon trail length (default: 120)
rotation: 45, // rotation angle in degrees (default: 45)
amplitude: 0.5, // wave amplitude (default: 0.5)
speed: [0.004, 0.008], // min/max animation speed
hue: [11, 14], // hue oscillation range
saturation: 0.8, // color saturation (default: 0.8)
brightness: 1.0, // color brightness (default: 1.0)
cardAlpha: 0.85, // card background opacity (default: 0.85)
headerAlpha: 0.7, // header opacity (default: 0.7)
sidebarAlpha: 0.8, // sidebar opacity (default: 0.8)
};
</script>Config priority: defaults → localStorage → window.canvasRibbonsConfig
- Injects a
<canvas>element ondocument.bodywithz-index: 0andpointer-events: none - Adds CSS custom properties to make HA backgrounds transparent
- Renders animated Bézier curves (ribbons) via
requestAnimationFrame - No iframes, no shadow DOM hacks — clean DOM injection
# Install dependencies (for tests)
npm install
# Run tests (20 unit tests, jsdom)
node canvas-ribbons.test.js
# Generate screenshot
node scripts/generate-screenshot.jsMIT — Copyright (c) 2026 JI ENGINEERING
Based on animation.79.canvas-ribbons from lovelace-bg-animation by @ibz0q.
Original animation by Boris Šehovac.
