
The inchworm menu
Menus, Hover, Transitions
The «Done for today» button of a habit app («Read 20 pages»): tap it and it squeezes on a spring, the line-drawn flame lights up and grows a little, the streak count rolls from 11 to 12 days digit by digit, on the week today joins the days before it with one bar of colour, and the button turns into «Done · 12 day streak» with a tick drawing itself. A second tap undoes it: the flame dies down, the count goes back to 11 and the bar pulls back. While lit, the flame slowly changes shape by itself. On white, a single ember accent.
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>
<!--
"Streak button" 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>Streak button</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 streak button of a habit app: one tap marks today as done, the flame lights up, the count of days
rolls on, today joins the days before it on the week, and a second tap undoes it -->
<section class="card" data-card aria-label="Daily habit">
<span class="card__edge" aria-hidden="true"></span>
<span class="card__glow" aria-hidden="true" data-glow></span>
<header class="head">
<span class="head__title">Read 20 pages</span>
<span class="head__meta">Daily · 8:30 pm</span>
</header>
<div class="streak" aria-live="polite">
<span class="flame" data-flame aria-hidden="true">
<svg viewBox="0 0 40 48">
<path class="flame__body" data-flame-body d="M20 4 C 25 12 33 17 33 29 C 33 38 27 44 20 44 C 13 44 7 38 7 29 C 7 22 11 18 13 13 C 15 18 17 20 19 20 C 19 14 18 9 20 4 Z"/>
<path class="flame__core" data-flame-core d="M20 25 C 23 29 26 31 26 35 C 26 39 23 41 20 41 C 17 41 14 39 14 35 C 14 31 17 29 20 25 Z"/>
</svg>
</span>
<span class="streak__num" data-num aria-hidden="true"></span>
<span class="streak__unit">day streak</span>
<span class="vh" data-say>11 day streak</span>
</div>
<div class="week" data-week aria-hidden="true">
<span class="week__bar" data-bar></span>
<span class="week__day" data-day>M</span>
<span class="week__day" data-day>T</span>
<span class="week__day" data-day>W</span>
<span class="week__day" data-day>T</span>
<span class="week__day" data-day>F</span>
<span class="week__day" data-day>S</span>
<span class="week__day" data-day>S</span>
</div>
<button class="btn" type="button" aria-pressed="false" data-btn>
<span class="btn__bg" data-btn-bg aria-hidden="true"></span>
<span class="btn__face btn__face--todo" data-todo>
<span class="btn__label">Done for today</span>
</span>
<span class="btn__face btn__face--done" data-done aria-hidden="true">
<svg class="btn__tick" viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.4 8.4 6.6 11.4 12.6 4.8"/></svg>
<span class="btn__label">Done · <span data-done-n>12</span> day streak</span>
</span>
</button>
</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.
32 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Streak button” from Animorio and fit it into my site«Done for today» and «Done · 12 day streak» sit on top of each other, absolutely positioned and centred in a button as wide as the card: the hidden label can never widen anything, and the change is only a swap of rising and falling.
Each digit is a column from 0 to 9 moved with yPercent: only the digit that changes rolls, with back.out, the units a moment before the tens.
Behind the letters of the week there is a single bar, measured from the real positions of the days: stretching it to today joins it to the days before with no seams between pieces, and it is measured again on resize.
The flame path has three shapes with the same commands; while lit, GSAP moves between them with attr d in a slow back and forth, with no beating and no glow.
| Name | File | Default | What it changes |
|---|---|---|---|
STREAK | script.js | 11 | The days already in the streak before today. |
TODAY | script.js | 4 | Which day of the week is today, from 0 (Monday) to 6 (Sunday). |
DAYS_BEFORE | script.js | 4 | How many days of this week are already done before today. |
SPRING | script.js | 0.55 | How springy the press, the flame and the bar are (lower means more bounce). |
FLAME_LIFT | script.js | 1.12 | How much the flame grows when it lights up. |
ROLL | script.js | 0.55 | Seconds for the number to roll to the next day. |
IDLE | script.js | 6 | Seconds after your last touch before the demo plays by itself again. |
In habit, reading, language or workout apps: the daily gesture that marks a goal done and shows the streak growing.
Everything is in em and the size depends on both the width and the height of the window, so the card fits whole in the phone box; the button is as wide as the card and easy to tap.
No springs, no shifting flame and no rolling numbers: the two faces cross-fade, the flame takes its colour and the bar is already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.
Tested on 30 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.
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.