Live preview · fully interactive
The prompt
Build an SVG stroke-draw of the word FLOW. ## Look SVG text FLOW at 96px, weight 700, viewBox 0 0 520 140. A stroke layer in #c4b5fd sits over a fill layer in #f2f2f7. Page #08080d. ## Behavior Animate stroke-dasharray and stroke-dashoffset from 900 to 0 over 1.6s ease. Fade the fill from opacity 0 to 1 over 0.4s, delayed 1.4s. ## Design tokens - Stroke #c4b5fd; fill #f2f2f7; page #08080d. ## Motion - Draw 1.6s ease. Fill fade 0.4s starting at 1.4s. ## Constraints - Single self-contained HTML file. No libraries. CSS animation only. - Honor prefers-reduced-motion: reduce by skipping the loop and leaving a readable static frame - Readable at 390px width with no horizontal page scroll
The code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
background: #08080d; color: #f2f2f7; font-family: Inter, system-ui, sans-serif;
min-height: 100vh; overflow: hidden;
}
.hint { position: absolute; left: 16px; top: 16px; z-index: 5; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a99; }
main { min-height: 100vh; display: grid; place-items: center; } svg { width: min(80vw, 520px); height: auto; } .draw { fill: transparent; stroke: #c4b5fd; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s ease forwards; } @keyframes draw { to { stroke-dashoffset: 0; } } .fill { fill: #f2f2f7; opacity: 0; animation: fade 0.4s ease 1.4s forwards; } @keyframes fade { to { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .draw { stroke-dashoffset: 0; animation: none; } .fill { opacity: 1; animation: none; } }
@media (max-width: 420px) {
.hint { font-size: 10px; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
</style>
</head>
<body>
<main><svg viewBox="0 0 520 140" aria-label="FLOW"><text class="fill" x="20" y="100" font-size="96" font-family="Inter, sans-serif" font-weight="700">FLOW</text><text class="draw" x="20" y="100" font-size="96" font-family="Inter, sans-serif" font-weight="700">FLOW</text></svg></main>
<script>
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) { document.querySelectorAll("text").forEach(function (n) { n.style.animation = "none"; }); }
</script>
</body>
</html>About this effect
The word FLOW is an SVG path animated with stroke-dashoffset over 1.6s, then the fill fades in over 0.4s. Reduced motion shows the filled word.
Similar effects
Scramble / Decode Text
Headlines that decode from random characters into the final message, with hover re-trigger.
Split Text Reveal
Characters rotate up from masked lines in a cascading GSAP stagger. No paid plugins.
Typewriter Code
A code editor that types itself, syntax-highlights each line, then deletes and loops.