
The coloured fog background
Backgrounds, WebGL
An animated background for the first page of an invented coffee house, Ferrow: a real photo of a white cup on a dark table, with beans scattered around, and over it the rising steam, drawn live in WebGL. The steam leaves the mouth of the cup in thin wisps that sway and open as they climb, and passes behind the headline. The pointer moves through it like a hand over the cup: it pushes the steam and turns it in small eddies that rise with it and slowly calm down. A tap on the page lets out a fresh puff; the button is the elastic pill.
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>
<!--
"Coffee steam background" 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 coffee background with the steam the pointer swirls</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/fraunces@5.3.0/full.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full-italic.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the first screen of an invented coffee house, Ferrow: a real photo of a cup on a dark table, and over it the
steam, drawn live in WebGL; the pointer moves through the steam and swirls it, the swirl rises with it and
settles; a tap on the page lets the cup breathe out a fresh puff -->
<main class="stage" data-stage>
<div class="photo" data-photo>
<img src="caffe.webp" alt="A white cup of hot coffee on its saucer, on a dark wooden table scattered with coffee beans" width="960" height="639" data-img>
</div>
<canvas class="steam" data-steam aria-hidden="true"></canvas>
<span class="shade" aria-hidden="true"></span>
<span class="grain" aria-hidden="true"></span>
<header class="nav" data-in>
<a class="brand" href="#" aria-label="Ferrow Coffee House">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<ellipse cx="12" cy="12" rx="7.2" ry="9.6" transform="rotate(28 12 12)"></ellipse>
<path d="M9.1 4.6c3.2 2.6 1.9 5.6 1.9 7.4s-1.3 4.8 1.9 7.4" transform="rotate(28 12 12)"></path>
</svg>
<span class="brand__name">Ferrow</span>
</a>
<nav class="links" aria-label="Main">
<a href="#">Menu</a>
<a href="#">Beans</a>
<a href="#">Visit</a>
</nav>
<a class="order" href="#">Order ahead</a>
</header>
<section class="head" aria-labelledby="hero-title">
<p class="pill" data-in>
<span class="pill__tag">Today</span>
<span class="pill__text">Guji, Ethiopia, on the slow bar</span>
<svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M6 3.5 10.5 8 6 12.5"></path></svg>
</p>
<h1 class="title" id="hero-title" data-in>Slow mornings,<br><em>poured warm</em></h1>
</section>
<footer class="foot">
<p class="lede" data-in>A small roastery on Wren Street. Single origins, pastries from seven, and a table that is yours for as long as the cup is.</p>
<div class="actions" data-in>
<button class="cta" type="button" data-cta>
<span class="cta__fill" aria-hidden="true"></span>
<span class="cta__label">Reserve a table</span>
<svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"></path></svg>
</button>
<a class="ghost-btn" href="#">See the menu</a>
</div>
</footer>
<p class="hint" data-hint>
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 15c0-4 6-3.5 6-7.5S6.5 3 6.5 3"></path><path d="M10.5 16c0-3.4 5-3 5-6.4S12.8 5.6 12.8 5.6"></path></svg>
<span>Move through the steam</span>
</p>
<svg class="ghost" data-ghost viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.5-3.3 2.4 5.3 2.3-1-2.4-5.2 4.8-.2z"></path></svg>
</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.
28 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 “Coffee steam background” from Animorio and fit it into my siteThe cup is a plain img, anchored at the bottom: as tall as the page but never under 80 %, so on a narrow screen the wall goes on above and the top edge fades into the page colour with a mask. JavaScript measures where the mouth of the cup is (as fractions of the photo) and hands it to the shader.
The WebGL canvas draws a single triangle and only the steam, in premultiplied alpha: outside the column the shader leaves at once with an empty pixel. The canvas is under half the page pixels: steam is soft and the browser stretches it without it showing.
A four-octave fbm noise, warped by two more fbm and moved up with time; folded into ridges with 1 − |2f − 1| and raised to a power it turns into a web of thin wisps. The column is a gaussian that widens as it climbs, sways more higher up and fades before the top of the page.
A small 2D canvas, an eighth of the page, holds the pointer's push: red and green the direction, blue the strength, on a neutral ground. Every frame it rises a few pixels with the steam and drifts back to neutral a little at a time. The shader takes the steam from where the hand came from and adds an eddy, so stirred steam turns and climbs.
The puff is a value GSAP takes to 1 and lets fall over two and a half seconds: the steam gets thicker and climbs faster, and an upward push from the mouth makes it roll. The button swells its body with elastic.out and widens its letters on Mona Sans' wdth axis.
| Name | File | Default | What it changes |
|---|---|---|---|
RISE | script.js | 1 | How fast the steam climbs. |
DENSITY | script.js | 1 | How thick and bright the steam is. |
SWIRL | script.js | 1 | How much the pointer pushes and swirls the steam. |
CALM | script.js | 2.4 | How many seconds stirred steam takes to calm down. |
HAND | script.js | 70 | The radius of the hand that stirs the steam, in pixels. |
AUTO_PILOT | script.js | 3 | After how many seconds without a pointer the drawn one takes over (0 never). |
For the first page of a bar, a coffee shop, a roastery, a tea room or a restaurant: when the product photo should stay the star but feel alive, and a small gesture should invite a touch.
Same animations: the finger stirs the steam (the page over the demo doesn't scroll) and a tap makes the puff. The photo anchors to the bottom and the wall carries on above, so the cup stays under the headline; the links and the line of text go and the two buttons sit in the middle.
With reduced motion the steam is already there, still, with its wisps; no puffs, no drawn hand, no zoom on the photo, and the words only fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 6 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.