forever components

Backgrounds

Particle Constellation

18–60 lilac/tan/mauve particles drift and bounce; nearby pairs connect with fading lines, forming a shifting constellation network on a dark background.

canvasmedium complexitysubtle motion

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Dark-theme hero backgrounds, tech or data-science landing pages, ambient looping screensavers needing a networked/connected motif.

When not to

Light backgrounds (hardcoded dark canvas). Layouts with dense text overlays — moving lines compete with reading.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change COLORS to ["#ff6b35","#f7c59f","#efefd0"] for a warm palette, increase LINK distance from 96 to 140, and set particle count cap from 60 to 80. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • color palette (COLORS array)
  • link distance threshold (LINK=96)
  • particle count range (min 18, max 60)
  • particle speed (vx/vy * 0.35)
  • particle radius range (1 + random * 1.6)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • DPR-aware canvas sizing with ResizeObserver
  • IIFE wrapper
  • reduced-motion guard (static single frame)
  • visibilitychange pause
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • O(n²) line-drawing loop — at max 60 particles this is fine, but raising count past ~100 will drop frames on low-end devices
  • Background color is hardcoded in CSS var --bg-900; must edit CSS to change from dark navy
  • No pointer interactivity — particles do not react to cursor

particlesconstellationcanvasnetworkbackgroundambientgenerative

More Backgrounds components

  • Aurora BorealisThree blurred, screen-blended gradient ribbons drift and skew over a near-black background, simulating northern lights in blush, cream, and rose.
  • Mesh GradientFour blurred radial blobs in cream, gold, and tan drift and scale on a dark background with screen blend mode, creating a soft animated mesh gradient.
  • Film GrainSVG feTurbulence noise jitters over a dark radial-tinted base with scrolling scanlines and a blinking magenta REC dot for an analog film look.
  • Digital RainCyan katakana and hex glyphs fall in columns down a dark canvas, leaving fading trails; occasional bright white leading chars evoke the Matrix effect.
  • Layered WavesThree SVG wave layers in iris, cyan, and dark slide horizontally at different speeds over a deep blue-gradient sky, creating a parallax depth effect.
  • Starfield WarpStars streak outward from center as cyan/purple/blue light trails simulating hyperspace warp. Auto-spawning keeps density constant on any viewport.