SVG Animations
Stroke Draw-On
An 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.
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, data-viz intros, loading screens, or any ambient display needing elegant self-drawing line art.
When not to
Light backgrounds (hardcoded dark body color). Contexts needing user interaction — it runs passively with no input handling.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the stroke color to sage (#7D8570) by updating the stroke value on .ssa01-line and .ssa01-ring, set DRAW=3500 to slow the draw-on, and add two more anchor points to P to extend the constellation. 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
- stroke color (#A68D3F on .ssa01-line)
- draw/hold/fade timing (DRAW=2600, HOLD=1500, FADE=900)
- anchor points array (P)
- node dot radius (r=2.4)
- easing function (ease / outBack)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (static fallback)
- visibilitychange pause logic
- getTotalLength() + strokeDasharray/strokeDashoffset pattern
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
- getTotalLength() requires the SVG to be in the DOM before calling; SSR or hidden elements will return 0
More SVG Animations components
- 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.
- Gradient SweepA 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.