
Tiles that rise
SVG, Hover, Physics
The weekly mood card of a made-up wellness app, Bellwort, white on a warm grey with one violet: the chart line is an elastic cord of 49 particles moved by hand-made verlet physics, each hung on a spring to the real value of its day. Pull it with a finger and it stretches and thins, the tooltip reads the mood under the finger; let go and it wobbles and settles on the real values. Today is still dashed: pull its point and let go, and it lands on the nearest mood, logs it, the tick draws itself and the average rolls from 7.1 to 7.4.
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>
<!--
"Elastic mood 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>Bellwort, mood this week: the elastic line you pull</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 weekly mood card of a made-up wellness app, Bellwort. The line of the chart is an elastic cord made of
small particles (verlet, step capped at 1/30 s): each one is held by a spring to the real values of the week.
Pull it with a finger and it stretches, let go and it wobbles back to the truth. Today is still open: pull
today's point and let go, and it settles on the nearest mood and logs it -->
<section class="card" data-card aria-label="Mood this week, Bellwort">
<span class="card__sheen" aria-hidden="true"></span>
<header class="head">
<span class="mark" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M10 3.2c-2.6 2.2-3.6 4.6-3 7.2.5 2 1.6 3.6 3 6.4 1.4-2.8 2.5-4.4 3-6.4.6-2.6-.4-5-3-7.2Z"/><path d="M10 9.4v7.4"/></svg>
</span>
<span class="who">
<span class="who__name">Bellwort</span>
<span class="who__what">Mood check-in</span>
</span>
<span class="range">
This week
<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M3.2 4.8 6 7.6l2.8-2.8"/></svg>
</span>
</header>
<div class="stat">
<p class="stat__big"><span class="stat__num" data-avg>7.1</span><span class="stat__of">/ 10</span></p>
<div class="stat__side">
<span class="stat__word" data-word>Good</span>
<span class="delta"><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M6 9.4V2.8M3.2 5.4 6 2.6l2.8 2.8"/></svg><span data-delta>0.4</span> vs last week</span>
</div>
</div>
<div class="chart" data-chart>
<svg class="plot" data-plot role="img" aria-label="Mood line for Monday to Sunday">
<defs>
<linearGradient id="fill" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--accent)" stop-opacity="0.2"/>
<stop offset="1" stop-color="var(--accent)" stop-opacity="0"/>
</linearGradient>
<filter id="soft" x="-10%" y="-40%" width="120%" height="180%"><feGaussianBlur stdDeviation="5"/></filter>
</defs>
<g data-guides></g>
<path class="area" data-area fill="url(#fill)"/>
<path class="shadow" data-shadow filter="url(#soft)"/>
<path class="line" data-line/>
<path class="line line--open" data-open/>
<g data-dots></g>
<g data-days></g>
</svg>
<div class="tip" data-tip aria-hidden="true"><span class="tip__in"><b data-tip-day>Wed</b><span data-tip-word>Okay</span><i data-tip-num>5.4</i></span></div>
<div class="finger" data-finger aria-hidden="true"><span class="finger__in"></span></div>
</div>
<footer class="foot">
<p class="hint" data-hint>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 2.6v10.8M5.2 5.4 8 2.6l2.8 2.8M5.2 10.6 8 13.4l2.8-2.8"/></svg>
<span>Pull today’s point to log your mood</span>
</p>
<p class="done" data-done aria-live="polite">
<svg viewBox="0 0 16 16" aria-hidden="true"><path data-check d="M3.6 8.4 6.6 11.2 12.4 4.8"/></svg>
<span>Logged today, <b data-done-word>Great</b></span>
</p>
</footer>
</section>
</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.
30 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 “Elastic mood chart” from Animorio and fit it into my siteBetween one day and the next there are eight particles, 49 in all. Each has a home on the Catmull-Rom curve through the real values, and the rest length between two neighbours is their distance at home. When today is logged the homes are recomputed and the cord goes there by itself.
At every 1/120 s step each particle keeps its speed (position minus previous position, times 0.986) and gets the spring towards home, stronger on the days and softer in between. A frame never counts more than 1/30 s, so a card coming back into view does not make the cord jump.
After the spring, two passes of constraints correct the distance between neighbours by only 14 percent: the cord stretches instead of dragging everything along. The largest stretch thins the stroke from 2.4 to 1.6 px.
The particle under the finger follows it by 32 percent each step, with no home spring; its old position is kept, so on release it leaves with the speed it had. The tooltip reads the value from the height, with the nearest of five moods, and stays inside the chart at the edges.
If the released point is in the last half day, the value goes to the nearest level, the curve is recomputed and the dashes turn solid. The average rolls with GSAP in 0.9 s, the tick draws with stroke-dashoffset and the point goes from 1.8 back to 1 on an elastic.
| Name | File | Default | What it changes |
|---|---|---|---|
SPRING | script.js | 70 | How hard each point is pulled back to its real value (higher, a faster wobble). |
DAMPING | script.js | 0.986 | How much movement is kept at every small step (closer to 1, it wobbles longer). |
ELASTIC | script.js | 0.14 | How much the neighbours follow a pulled point (higher, a stiffer cord). |
GRAB | script.js | 0.32 | How closely the grabbed point follows the finger. |
POINTS | script.js | 8 | Particles of the cord between one day and the next. |
ENTRY_WAVE | script.js | 0.6 | Seconds the cord takes to wake up from left to right on arrival. |
LAST_WEEK | script.js | 6.7 | Last week’s average, for the change next to the number. |
LOOP | script.js | true | Left alone, the finger pulls the line and logs today again and again. |
For the dashboard of a wellness, sleep, training or journaling app: when a chart should feel like something you can touch, and logging today’s value means pulling the line itself instead of filling in a form.
The same physics, with sizes taken from the chart at every resize: the card fills the width, the chart is tall in proportion to the screen height and the tooltip stays inside the edges. Pull with a finger, with touch-action off on the card.
No wobble and no moving finger: the line is already on the values, today is logged and cleared with a fade of the chart, the grabbed point follows the finger without physics and goes straight back.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.2 KB; the libraries: GSAP 28 KB.
Tested on 10 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.