SVG Animations
Gradient Sweep
A faceted hex-prism wireframe raked by a rotating spectral gradient band; the lit slice shifts hue continuously via rAF while SMIL drives the sweep rotation.
svgmedium complexitymoderate 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, tech/sci-fi themes, ambient loading screens needing a focused geometric focal point.
When not to
Light backgrounds (dark navy hardcoded). Contexts requiring legible text overlays — the glow filter competes with content.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the sweep speed by setting dur="4s" on the animateTransform, and shift the base hue from 100 to 30 (amber) by editing the hue variable and the hsl stop-colors. 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
- sweep rotation speed (dur='7s' on animateTransform)
- base hue start (hue=210)
- hue drift rate (dt*0.05)
- gradient band width (stop offsets .47/.53)
- wireframe stroke colors (#2a3050 base, #B1CCA4 accents)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion static fallback branch
- visibilitychange pause (svg.pauseAnimations/unpauseAnimations + rAF cancel)
- SVG glow filter (feGaussianBlur + feMerge)
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Background color hardcoded in CSS — must edit to use on non-dark surfaces
- SMIL animateTransform and rAF hue drift are separate clocks; they can drift out of sync on tab restore
- Wireframe geometry is computed once at load; not responsive to container resize
More SVG Animations components
- Stroke Draw-OnAn ochre constellation draws itself via stroke-dashoffset, with anchor nodes blooming in as the line passes; the glyph holds then fades and redraws in a loop.
- Blob MorphA glowing blush gradient blob slowly morphs between 5 organic shapes via Catmull-Rom spline interpolation, with a slow CSS spin and radial halo glow.
- Gooey Merge7 buttery-gold blobs orbit a shared center under an SVG goo filter, continuously merging and splitting as a global breathing pulse drives their spread.
- Turbulent BannerSerif gradient "TURBULENT" ripples under animated feTurbulence heat-haze; baseFrequency and displacement scale breathe via coupled sines, dark vignette…
- Icon MorphA peach gradient media icon morphs between play, pause, and stop states via point-interpolated Catmull-Rom curves, slowly spinning inside a glowing ring.
- Dash FlowOrthogonal circuit traces with powder-blue light pulses travelling via stroke-dashoffset; junction pads flicker as current passes. Dark navy background.