forever components

Cosmic & Space

Constellation Connect

46 drifting star nodes auto-connect with faint magenta lines when close; cursor draws lines to nearby stars and brightens them on hover.

canvasmedium complexitysubtle motionpointer

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-mode hero backgrounds, space/night themes, data-network metaphors, ambient looping screensavers.

When not to

Light backgrounds (hardcoded dark navy). Contexts needing legible text overlays — lines and motion compete with reading.

Working with an AI agent

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

Change node count from N=46 to 80, widen the connection threshold from LINK=0.2 to 0.28, and shift line color from rgb(218,62,140) to rgb(192,180,89) for a warmer gold palette.

Safe to edit

  • node count (N=46)
  • connection distance threshold (LINK=0.2)
  • node drift speed (vx/vy *= 0.0006)
  • line color (rgb(218,62,140))
  • cursor influence radius (factor *4)
  • twinkle speed (t += 0.02)

Keep intact

  • DPR-aware canvas sizing
  • visibilitychange pause/resume
  • prefers-reduced-motion guard (freeze position, single frame)
  • IIFE wrapper

Known limitations

  • O(N²) proximity check — node counts above ~120 will strain low-end CPUs
  • Background color hardcoded in CSS — must edit to change from dark navy
  • Cursor lines disappear on touch devices (no persistent pointer position)

starsconstellationcanvasproximity-linespointernetworkambientspace

More Cosmic & Space components

  • Orbiting Planet SystemFour glowing planets orbit a radiant sun on tilted elliptical rings with depth-sorted rendering; the system drifts subtly toward the pointer.
  • Black-hole Accretion Swirl110 heat-colored particles spiral inward across a tilted accretion disk toward a glowing event horizon; pointer movement boosts swirl speed.
  • Twinkling Starfield115 multicolor stars twinkle via sine waves; sparkle crosses appear on larger stars; stars brighten near cursor. Static fallback for reduced-motion.
  • Spiral Galaxy Rotate115 stars form a two-armed spiral galaxy rotating around a violet radial-gradient core; pointer move briefly doubles spin speed.
  • Comet Streak LoopCyan and violet comets with glowing heads and gradient tails streak diagonally across a twinkling dark starfield; click spawns an extra comet (up to 5).
  • Ringed Planet RotateAmber gas giant with tilted Saturn-like rings slowly rotates over a twinkling starfield; pointermove adjusts ring tilt and light angle dynamically.