
Melting words
Text, Scroll, SVG
Scroll inside the preview
A minimal scroll animation: two thin circles, Design and Code, start apart on warm white. Scrolling brings them together on a spring; they touch with a small blue tick, the edges that end up inside each other turn dashed like hidden lines, then the shared part floods with ultramarine and the word Product lands in it, one letter at a time, gaining weight. When the scroll stops the circles settle one pixel past and back.
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>
<!--
"Venn diagram scroll" 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 Venn diagram that closes in on scroll</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>
<!-- two thin circles, Design and Code, drawn apart on warm white. Scrolling brings them together: they touch with a
small tick, the edges that fall inside each other turn dashed, then the overlap floods with the accent and the
word that lives there, Product, lands in it letter by letter. The circles ride a spring, one pixel past and back -->
<main class="pagina">
<section class="corsa" data-corsa aria-label="Venn diagram: Design and Code overlap in Product">
<div class="palco">
<div class="pezzo" data-pezzo>
<p class="sopra" data-sopra>Halden Studio, how we work</p>
<div class="diagramma" data-diagramma>
<svg class="venn" data-venn aria-hidden="true">
<path class="venn__dentro" data-dentro-a></path>
<path class="venn__dentro" data-dentro-b></path>
<path class="venn__lente" data-lente></path>
<path class="venn__fuori" data-fuori-a></path>
<path class="venn__fuori" data-fuori-b></path>
<line class="venn__bacio" data-bacio></line>
</svg>
<span class="nome nome--a" data-nome-a>Design</span>
<span class="nome nome--b" data-nome-b>Code</span>
<span class="incontro" data-incontro>Product</span>
</div>
<p class="sotto" data-sotto>We work where they overlap.</p>
</div>
<p class="scendi" data-scendi>Scroll</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.
18 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 “Venn diagram scroll” from Animorio and fit it into my siteEverything depends on the distance between the centres measured in radii: 2.3 at the start (apart), 0.96 at the end (half overlapping). The radius is the width divided by (2 + distance), so the circles grow as they close in and the drawing stays the same width.
When they overlap, the two meeting points sit on the vertical through the centre, at a height of the square root of r² minus (d/2)². From there each circle is two SVG arcs: the outer one (large-arc 1) solid and the inner one (large-arc 0) dashed; the blue lens is the two inner arcs together.
The overlap goes from 0 to 1; the lens fill is a smooth curve between 0.35 and 0.95, and the dashes fade as much as the blue grows. The word starts from a paused timeline above 0.86 and reverses below 0.74: the gap keeps it from flickering on the edge.
ScrollTrigger only gives the progress. The distance chases the wanted value on a spring integrated in steps of 1/120 of a second in the GSAP ticker; when it reaches zero the overlap changes sign and the tick fires, lighting up and fading in 0.7 seconds.
As the pointer moves the script measures its distance from both centres: inside one only, that circle gains weight; inside both, the word widens on the wdth axis. Each state chases its value on a small spring.
| Name | File | Default | What it changes |
|---|---|---|---|
LEFT | script.js | 'Design' | The name in the left circle. |
RIGHT | script.js | 'Code' | The name in the right circle. |
MIDDLE | script.js | 'Product' | The word that lands in the shared part. |
GAP | script.js | 0.3 | The space between the circles at the start, as a share of the radius. |
OVERLAP | script.js | 0.52 | How far they overlap at the end, as a share of the diameter. |
STIFFNESS | script.js | 150 | The spring that moves the circles: higher is quicker. |
BOUNCE | script.js | 0.3 | How far they go past before settling (0 = not at all). |
SMOOTH | script.js | 1.1 | Seconds of the smooth scroll; 0 for the browser’s own. |
For the “how we work” section of a studio or an agency, to say where two crafts meet (design and code, food and wine, data and people), on a service page or in the pitch of a product that joins two worlds.
The same animation with adapted sizes: the drawing is as wide as the box allows, in width and height, and the names and the word shrink if they do not fit their part.
No movement: the circles already overlap, the shared part is blue with Product inside, and it all appears in a fade.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 1 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.