Backgrounds
Starfield Warp
Stars streak outward from center as cyan/purple/blue light trails simulating hyperspace warp. Auto-spawning keeps density constant on any viewport.
canvasmedium complexityintense motion
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Dark-mode hero backgrounds, sci-fi or space themes, loading screens, immersive ambient backdrops.
When not to
Light-background UIs (background hardcoded near-black). Layouts where streaking motion competes with readable text overlays.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the tint palette to warm gold/orange by replacing tint() return values: t>0.66 to "rgba(255,220,80," and t>0.33 to "rgba(255,140,40," then increase star density by changing the divisor from 1600 to 900.
Safe to edit
- star density divisor (1600 in Math.round((w*h)/1600))
- speed range (0.4 + Math.random()*1.6)
- trail color palette (tint() function)
- trail line width cap (2.4)
- motion blur alpha (0.35 in rgba fill)
Keep intact
- IIFE wrapper
- prefers-reduced-motion static fallback
- visibilitychange pause via runLoop
- DPR-aware canvas sizing with ResizeObserver
Known limitations
- Background color hardcoded in CSS and JS — must change both to shift from near-black
- Star count caps at 220 — large 4K displays may look sparse
- No pointer interaction — purely passive
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.
- Particle Constellation18–60 lilac/tan/mauve particles drift and bounce; nearby pairs connect with fading lines, forming a shifting constellation network on a dark background.
- 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.