
The colour columns
Hover, SVG
The route card of a made-up cycling app, Ridgeway, in the premium product style: on a near black page the elevation profile of a 142 km stage draws itself as one thin SVG line that takes the colour of its own grade, cool grey on the flat, amber on the climbs, coral where it bites. The three climbs raise the flag of their category, a cursor rides the stage on a spring with a light under it and a tooltip with kilometre, altitude and grade, and when it rides into a climb it lights it up and the numbers below switch from the whole route to that climb. At the summit the route is sent to the bike computer.
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>
<!--
"Stage elevation chart" 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>The elevation chart of the stage with the climbs that light up</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the route card of a made-up cycling app, Ridgeway: the elevation profile of a 142 km stage drawn as one thin
SVG line coloured by its own gradient (cool on the flat, amber on the climbs, coral where it bites), the three
climbs lighting up with their category, a cursor that rides the route with a light under it, and the button
that sends the route to the bike computer -->
<article class="route" data-card>
<span class="route__rim" data-rim aria-hidden="true"></span>
<header class="route__head">
<div class="route__title">
<span class="route__eyebrow">Stage 4 · Saturday</span>
<h1 class="route__name">The Ventara Loop</h1>
</div>
<span class="route__chip">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M1.5 13l4.6-7.2 2.7 4 1.7-2.4L14.5 13z"/><path class="route__chip-flag" d="M10.2 7.4V2.6l2.6 1.1-2.6 1.1"/></svg>
Summit finish
</span>
</header>
<div class="route__chart" data-chart>
<div class="tip" data-tip aria-hidden="true">
<span class="tip__face">
<span class="tip__km" data-tip-km>km 0.0</span>
<span class="tip__alt" data-tip-alt>320 m</span>
<span class="tip__grade" data-tip-grade>0.0%</span>
</span>
</div>
<svg class="plot" data-svg aria-hidden="true">
<defs>
<linearGradient id="rg-grade" data-grade gradientUnits="userSpaceOnUse"></linearGradient>
<linearGradient id="rg-fade" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#fff" stop-opacity="0.95"/>
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<mask id="rg-area-mask" maskUnits="userSpaceOnUse" data-area-mask>
<rect data-area-mask-rect fill="url(#rg-fade)"/>
</mask>
<radialGradient id="rg-column" data-column-grad>
<stop offset="0" stop-color="currentColor" stop-opacity="0.42"/>
<stop offset="0.55" stop-color="currentColor" stop-opacity="0.12"/>
<stop offset="1" stop-color="currentColor" stop-opacity="0"/>
</radialGradient>
<radialGradient id="rg-head">
<stop offset="0" stop-color="#fff" stop-opacity="0.9"/>
<stop offset="0.25" stop-color="#ffc46b" stop-opacity="0.45"/>
<stop offset="1" stop-color="#ffc46b" stop-opacity="0"/>
</radialGradient>
<clipPath id="rg-drawn"><rect data-clip-drawn/></clipPath>
<clipPath id="rg-ridden"><rect data-clip-ridden/></clipPath>
</defs>
<g class="plot__grid" data-grid></g>
<g class="plot__bands" data-bands></g>
<ellipse class="plot__column" data-column fill="url(#rg-column)"/>
<g clip-path="url(#rg-drawn)">
<path class="plot__area" data-area fill="url(#rg-grade)" mask="url(#rg-area-mask)"/>
<path class="plot__line plot__line--dim" data-line-dim stroke="url(#rg-grade)"/>
</g>
<g clip-path="url(#rg-ridden)">
<path class="plot__line" data-line stroke="url(#rg-grade)"/>
</g>
<g class="plot__climbs" data-climbs></g>
<ellipse class="plot__head" data-head fill="url(#rg-head)"/>
<g class="plot__cursor" data-cursor>
<line class="plot__hair" data-hair/>
<circle class="plot__ring-shadow" data-ring-shadow r="7"/>
<circle class="plot__ring" data-ring r="4.5"/>
</g>
</svg>
<div class="flags" data-flags></div>
<div class="axis" data-axis aria-hidden="true"></div>
</div>
<section class="stats" aria-live="polite">
<p class="stats__caption"><span data-caption>Whole route</span></p>
<div class="stats__row">
<div class="stat"><span class="stat__label" data-label>Distance</span><span class="stat__value"><span data-value>0.0</span><small data-unit>km</small></span></div>
<div class="stat"><span class="stat__label" data-label>Elevation</span><span class="stat__value"><span data-value>0</span><small data-unit>m</small></span></div>
<div class="stat"><span class="stat__label" data-label>Max grade</span><span class="stat__value"><span data-value>0.0</span><small data-unit>%</small></span></div>
</div>
</section>
<button class="send" type="button" data-btn>
<span class="send__face" data-face>
<span class="send__icon" aria-hidden="true">
<svg viewBox="0 0 18 18">
<g data-icon-send><rect x="4.5" y="2.2" width="9" height="13.6" rx="2.2"/><path d="M9 5.4v5.2M6.8 8.6L9 10.8l2.2-2.2"/><path d="M7.4 13.2h3.2"/></g>
<circle class="send__arc" data-arc cx="9" cy="9" r="6.2" pathLength="1"/>
<path class="send__check" data-check pathLength="1" d="M4.6 9.4l3 3 5.8-6.4"/>
</svg>
</span>
<span class="send__words" data-words>Send to bike computer</span>
</span>
</button>
</article>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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.
37 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 “Stage elevation chart” from Animorio and fit it into my siteThe profile comes from fourteen key points (kilometre and altitude) joined with a cosine, plus three small sine waves for the rolling bits, faded to zero at the start and the finish. It is sampled every 250 metres: the same function gives the line, the total elevation gain (the sum of the rises from one sample to the next), the maximum grade and the numbers of each climb, so everything adds up.
The colour is not one stroke per segment but a single horizontal linearGradient in userSpaceOnUse with a stop every kilometre: each stop takes the colour of the grade there, interpolated between grey, amber and coral (STEEP says where it turns fully coral). The same gradient fills the area, with a mask that fades it towards the bottom.
The profile does not draw itself with a dash but with a clipPath that widens from the left, so line and area arrive together. A second clip, as wide as the cursor, keeps the part already ridden lit over a dim copy of the line. The SVG is rebuilt in pixels on every resize, so the line stays thin at any size.
The cursor follows the wanted kilometre (from the ride on its own or from the finger) on a spring integrated in three steps per frame: STIFFNESS and DAMPING decide how quick it is and how far it passes the mark. The ring widens a little with the speed, the light under it is an ellipse with a radialGradient in currentColor, and the colour comes from the grade at that point.
When the cursor stays a tenth of a second inside a climb, its flag lights up, the area glows, the line around it steps back and the numbers roll over to the climb on a short spring: the labels change with a touch of blur, the digits count to the new value. Outside every climb they go back to the whole route.
| Name | File | Default | What it changes |
|---|---|---|---|
DRAW | script.js | 2.6 | How many seconds the profile takes to draw itself. |
RIDE | script.js | 6 | How many seconds the cursor takes to ride the stage on its own. |
STIFFNESS | script.js | 140 | The cursor's spring: higher is quicker. |
DAMPING | script.js | 16 | Lower lets the cursor pass the mark and come back. |
LIGHT | script.js | 1 | How strong the light under the cursor and on the card's rim is. |
STEEP | script.js | 8 | The grade (in %) where the line turns fully coral. |
SPEED | script.js | 1 | 2 = the ride on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the ride on its own. |
For the route page of a cycling, running or hiking app, for the stage of a race or a gran fondo on the event's site, for the detail of a hike on a travel site: whenever a value has a profile along a distance and it pays to read it with a finger.
The same animation with adapted sizes: the card is as wide as the box, the chart is as tall as the screen allows and is rebuilt in pixels, the flags and the tooltip always stay inside the edges; the finger drags the cursor sideways and leaves the page free to scroll vertically.
The profile fades in already drawn, the flags fade in without a spring, the cursor appears still on the Passo Ventara and the numbers change without counting; the button changes its label and check with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 3 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.