
Melting words
Text, Scroll, SVG
Scroll inside the preview
The recipe section of Halde Coffee, a made-up coffee bar: a sticky stage with the espresso card (Ethiopia Guji, 18 grams) and, as you scroll, the 28 seconds of the shot. The grams-in-the-cup line and the dashed pressure line draw themselves on the chart over their faint traces, a playhead rides the curve, each phase leaves its tick and its label (pre-infusion, first drops, full pressure, stop) and the numbers count up. At the end the status turns to Pulled, the tasting notes spring in and the 1 : 2.2 ratio is stamped. Premium style, a real interface piece.
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>
<!--
"Espresso recipe curve" 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>Halde Coffee, the espresso recipe</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/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the recipe section of a made-up coffee bar, Halde Coffee. A sticky stage with the espresso recipe card: scrolling
runs the 28 seconds of the shot. The weight in the cup and the pump pressure draw themselves on the chart, a
playhead rides the curve, the phases light up as the shot passes them (pre-infusion, first drops, extraction,
stop), the numbers count up. At the end the tasting notes settle in and the ratio is stamped -->
<section class="corsa" data-corsa>
<div class="palco">
<p class="occhiello">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.2 6.2h8.2v3.4a3.4 3.4 0 0 1-3.4 3.4H6.6a3.4 3.4 0 0 1-3.4-3.4z"/><path d="M11.4 7.2h.9a1.5 1.5 0 0 1 0 3h-1.1"/><path d="M5.6 2.6c-.5.7.5 1.3 0 2M8.2 2.6c-.5.7.5 1.3 0 2"/></svg>
Halde Coffee · espresso recipe
</p>
<h2 class="titolo">Twenty-eight seconds,<br><span class="titolo__spento">one curve.</span></h2>
<figure class="carta">
<div class="carta__testa">
<div class="chicco">
<span class="chicco__nome">Ethiopia Guji</span>
<span class="chicco__info">Washed · roasted 6 Nov</span>
</div>
<span class="stato" data-stato><span class="stato__testo" data-stato-testo>Ready</span></span>
</div>
<dl class="numeri">
<div class="numero"><dt>Dose</dt><dd><span data-dose>18.0</span><small>g</small></dd></div>
<div class="numero"><dt>In the cup</dt><dd><span data-resa>0.0</span><small>g</small></dd></div>
<div class="numero"><dt>Time</dt><dd><span data-tempo>0</span><small>s</small></dd></div>
<div class="numero"><dt>Pressure</dt><dd><span data-pressione>0.0</span><small>bar</small></dd></div>
</dl>
<div class="grafico" data-grafico>
<div class="griglia" aria-hidden="true">
<span style="--y:0%"></span><span style="--y:25%"></span><span style="--y:50%"></span><span style="--y:75%"></span><span style="--y:100%"></span>
</div>
<svg class="linee" viewBox="0 0 600 300" preserveAspectRatio="none" aria-hidden="true">
<defs>
<clipPath id="taglio"><rect data-taglio x="0" y="-10" width="0" height="320"/></clipPath>
<linearGradient id="sotto" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" style="stop-color:var(--accento);stop-opacity:0.16"/>
<stop offset="1" style="stop-color:var(--accento);stop-opacity:0"/>
</linearGradient>
</defs>
<path class="fantasma fantasma--g" data-fantasma-g d=""/>
<path class="fantasma fantasma--p" data-fantasma-p d=""/>
<g clip-path="url(#taglio)">
<path class="area" data-area d=""/>
<path class="linea linea--p" data-linea-p d=""/>
<path class="linea linea--g" data-linea-g d=""/>
</g>
</svg>
<div class="fasi" data-fasi aria-hidden="true">
<span class="fase" data-fase="0" style="--x:0%"><i></i><b>Pre-infusion</b></span>
<span class="fase" data-fase="1" style="--x:23.2%"><i></i><b>First drops</b></span>
<span class="fase" data-fase="2" style="--x:33.9%"><i></i><b>Full pressure</b></span>
<span class="fase fase--fine" data-fase="3" style="--x:100%"><i></i><b>Stop</b></span>
</div>
<div class="testina" data-testina aria-hidden="true"><span class="testina__filo"></span><span class="testina__punto" data-punto></span></div>
<div class="assi" aria-hidden="true"><span>0 s</span><span>10</span><span>20</span><span>28 s</span></div>
<div class="legenda" aria-hidden="true">
<span class="legenda__voce"><i class="legenda__g"></i>Weight in the cup</span>
<span class="legenda__voce"><i class="legenda__p"></i>Pressure</span>
</div>
</div>
<div class="fondo-carta">
<ul class="note" data-note>
<li class="nota" data-nota>Bergamot</li>
<li class="nota" data-nota>White peach</li>
<li class="nota" data-nota>Black tea</li>
</ul>
<span class="rapporto" data-rapporto>1 : <b>2.2</b></span>
</div>
</figure>
</div>
</section>
<footer class="piede">Halde Coffee is a made-up coffee bar.</footer>
<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.
51 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 “Espresso recipe curve” from Animorio and fit it into my siteThe grams curve and the pressure curve are two small functions of time (first drops at 6.5 seconds, pressure rising from 3 to 9 bar and easing off at the end): the same functions draw the SVG lines and write the numbers, so the chart and the figures always agree.
A paused GSAP timeline carries a single value, the second of the shot, and ScrollTrigger scrubs it while the stage holds still with position: sticky. On every update a clipping rectangle widens to that second and uncovers the lines, and the playhead sits on the curve.
The phase ticks and labels are CSS, with spring transitions: the script switches a class on or off when the time passes their threshold, so they work backwards too.
When the second reaches 28 a small timed animation starts, not tied to the scroll: the numbers settle, the notes spring in and the ratio is stamped; scrolling back switches them off.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the whole shot takes: 2 is twice as long. |
SCRUB | script.js | 0.6 | How far the shot lags behind the scroll, in seconds. |
SHOT | script.js | 28 | Seconds of the shot shown on the chart. |
YIELD | script.js | 40 | Grams in the cup at the end. |
DOSE | script.js | 18 | Grams of ground coffee in the basket. |
FIRST_DROPS | script.js | 6.5 | The second when the first drops fall. |
PEAK | script.js | 9 | Bar of pressure at full extraction. |
For the page of a coffee bar or a roastery selling beans that wants to show the care behind a cup: the coffee of the month recipe, a bean’s page in the online shop, the «how we make it» section. It also suits a recipe app or a barista tools app.
The same animation with adapted measures: the four numbers wrap onto two rows, the legend and the third note are hidden, the card and the chart are sized on the height too and fit the stage.
No motion: the shot is already done, with the full lines, the phases lit, the notes and the ratio, and it appears with a fade.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.9 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 14 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.