
Melting words
Text, Scroll, SVG
Scroll inside the preview
The course page of a made-up city marathon, Harbour City Marathon 2026: as you scroll, on a thin-line SVG map of the city (blocks, the river with its two bridges, the harbour with its piers, the park with its pond) the orange course draws itself from the start with a glowing head and a hot trail at the tip of the line, the 5, 10, 21.1 and 30 km marks with their aid stations and the finish light up as it passes, each with a tag opening on a spring, and beside it a glass card counts the kilometres, fills the elevation profile with the gain and gives the split time at the chosen pace. At the end the finish lights up, a light runs the whole course and the course keeps its glow.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Marathon course map" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Harbour City Marathon course</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/inter-tight@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the course page of a made-up city marathon, Harbour City Marathon 2026. The stage sticks while you scroll: a
thin-line map of the city (blocks, the river, the harbour, the park) and the course drawing itself from the start
with a glowing head running at its tip. The kilometre marks, the aid stations and the finish light up as the
head passes, each with a small tag opening on a spring; beside the map a glass card counts the kilometres,
fills the elevation profile and gives the split time at the pace you choose. At the end the finish lights up
and the whole course takes a glow. -->
<main>
<section class="race" data-race>
<div class="stage" data-stage>
<div class="light light--a" data-light-a aria-hidden="true"></div>
<div class="light light--b" data-light-b aria-hidden="true"></div>
<div class="grain" aria-hidden="true"></div>
<div class="frame" data-frame>
<article class="panel" data-panel>
<span class="panel__edge" aria-hidden="true"></span>
<header class="head">
<span class="mark" aria-hidden="true">
<svg viewBox="0 0 16 16"><path d="M2.6 11.6c2.2-.2 3.4-1.6 4.4-3.6s2.2-3.6 4.4-3.8"/><path d="M11.4 4.2l2 0"/><path d="M2.6 11.6h3"/></svg>
</span>
<div class="head__words">
<p class="brand">Harbour City Marathon</p>
<p class="when">Sun 18 Oct 2026 <span class="sep" aria-hidden="true"></span> 07:30 <span class="sep sep--wide" aria-hidden="true"></span> <span class="wide">42.195 km, one loop</span></p>
</div>
<span class="tag-course">Course</span>
</header>
<div class="body">
<div class="map" data-map>
<div class="cam" data-cam>
<svg class="city" viewBox="0 0 600 400" aria-label="Map of the marathon course through Harbour City" role="img" data-city>
<defs>
<pattern id="waves" width="7" height="7" patternUnits="userSpaceOnUse" patternTransform="rotate(-32)">
<path d="M0 3.5h7" class="sea__hatch"/>
</pattern>
<pattern id="trees" width="9" height="9" patternUnits="userSpaceOnUse" patternTransform="rotate(18)">
<path d="M1.5 4.5h3" class="park__hatch"/>
</pattern>
<mask id="land" maskUnits="userSpaceOnUse" x="0" y="0" width="600" height="400" data-land></mask>
<radialGradient id="halo">
<stop offset="0" stop-color="#ffd7c4" stop-opacity="0.95"/>
<stop offset="0.35" stop-color="#ff6a3d" stop-opacity="0.45"/>
<stop offset="1" stop-color="#ff6a3d" stop-opacity="0"/>
</radialGradient>
<filter id="blur" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="3.2"/></filter>
<filter id="soft" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="7"/></filter>
</defs>
<rect class="ground" width="600" height="400"/>
<g data-sea></g>
<g data-river></g>
<g data-park></g>
<g class="blocks" mask="url(#land)" data-blocks></g>
<g data-bridges></g>
<g class="names" data-names></g>
<path class="route route--ghost" data-ghost/>
<path class="route route--aura" data-aura filter="url(#soft)"/>
<path class="route route--glow" data-glow filter="url(#blur)"/>
<path class="route route--line" data-line/>
<path class="route route--trail" data-trail/>
<path class="route route--sweep" data-sweep filter="url(#blur)"/>
<g data-marks></g>
<g class="head-dot" data-head>
<circle class="head-dot__halo" r="16" fill="url(#halo)" data-halo/>
<circle class="head-dot__ring" r="5.2"/>
<circle class="head-dot__core" r="2.6"/>
</g>
</svg>
<div class="labels" data-labels></div>
</div>
<div class="map__vignette" aria-hidden="true"></div>
</div>
<aside class="card" data-card>
<span class="card__edge" aria-hidden="true"></span>
<span class="card__glow" aria-hidden="true"></span>
<div class="card__top">
<span class="eyebrow">Live split</span>
<span class="chip"><span class="chip__words" data-chip>On course</span></span>
</div>
<div class="km">
<span class="km__num" data-km>0.0</span>
<span class="km__unit">km</span>
<span class="km__of">of 42.195</span>
</div>
<div class="elev">
<div class="row">
<span class="label">Elevation</span>
<span class="val"><span data-gain>+0</span> m</span>
</div>
<svg class="profile" viewBox="0 0 200 40" preserveAspectRatio="none" aria-hidden="true" data-profile>
<defs>
<linearGradient id="fillUp" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#ff6a3d" stop-opacity="0.55"/>
<stop offset="1" stop-color="#ff6a3d" stop-opacity="0"/>
</linearGradient>
<clipPath id="done"><rect x="0" y="0" width="0" height="40" data-done/></clipPath>
</defs>
<path class="profile__base" data-profile-area/>
<path class="profile__line" data-profile-line/>
<g clip-path="url(#done)">
<path class="profile__fill" data-profile-fill/>
<path class="profile__lit" data-profile-lit/>
</g>
<path class="profile__cursor" data-cursor d="M0 0V40"/>
</svg>
</div>
<div class="pace">
<div class="row">
<span class="label">Split at pace</span>
<span class="val val--muted">per km</span>
</div>
<div class="seg" role="radiogroup" aria-label="Pace" data-seg>
<span class="seg__thumb" data-thumb aria-hidden="true"></span>
<button class="seg__opt" type="button" role="radio" aria-checked="false" data-pace="255">4:15</button>
<button class="seg__opt" type="button" role="radio" aria-checked="true" data-pace="300">5:00</button>
<button class="seg__opt" type="button" role="radio" aria-checked="false" data-pace="345">5:45</button>
</div>
</div>
<div class="time">
<span class="time__num" data-time>0:00:00</span>
<span class="next"><span class="label">Next</span> <span class="next__words" data-next>Water, 5 km</span></span>
</div>
</aside>
</div>
</article>
</div>
<p class="sr" aria-live="polite" data-live></p>
</div>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
42 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Marathon course map” from Animorio and fit it into my siteThe section is 480vh tall and the stage inside is sticky at 100vh (100lvh where available). A paused GSAP timeline carries a single value from 0 to 1 and ScrollTrigger drives it with scrub: every frame the render function reads that value and places the line, the head, the map, the marks and the card.
The script draws the map in a 600 by 400 viewBox: blocks on a 40 grid, some split in two by a fixed-seed generator, kept off the river, the harbour, the park and the avenue by a mask; the river is a wide stroke with its two banks shifted by ten, the bridges sit where the course crosses the river, searched on its path.
The course is a path with rounded corners; its real length L comes from getTotalLength. stroke-dasharray is L and stroke-dashoffset goes from L to 0, written as attributes with setAttribute: the line pulls itself from the start. The hot trail is the same path with a 46-long dash moved to the tip, and the head sits at getPointAtLength.
Every aid station has its fraction, kilometres over 42.195. When the value passes it, the mark lights up and the HTML tag, placed over the map in percent of the viewBox, springs open from the mark's side; going back it closes. The one before folds to its name with a CSS transition.
The elevation profile is a 120-point path; a clipPath as wide as the distance run shows the orange part, and the gain is the sum of the climbs so far. The time is kilometres times pace, and changing the pace makes it roll. At the finish a 70-long dash runs the whole course once and a blurred aura stays lit.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the whole course takes: 2 = twice as long. |
TRAIL | script.js | 46 | How long, in map units, the hot trail behind the head is. |
LEAN | script.js | 0.1 | How much the map zooms in and leans towards the head (0 = still). |
POP | script.js | 1.7 | How far a tag passes its size when it opens (1 = no spring). |
GLOW | script.js | 1 | How strong the course glow and the lights behind the panel are. |
SWEEP | script.js | 1.6 | The seconds the finish light takes to run the whole course. |
On the course page of a marathon, a half, a road race, a cycling race or a trail, a staged walk, a city tour; or to tell a delivery route, a trip, a track in a running app. The course is changed in PTS (the points on the streets), the aid stations in MARKS, the elevation in the height function; the colours in --course, --water and --park in the CSS.
The same animations at adapted sizes: below 600 pixels the map goes on top at full width (at most 46% of the height) and the card underneath, in two columns with the kilometres and the time on the left, the profile and the switch on the right; the tags are smaller and on short screens the date goes, so it all fits in 341 by 410.
No long scroll and no movement: the course is already drawn with its glow, the aid stations and the finish lit with their tags, the card with 42.195 km, the gain and the final time; the panel fades in and the pace switch changes the time without rolling.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, Inter Tight (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 5 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.