
The slide-to-confirm button
Buttons, Physics, Transitions
The source control panel of an invented code editor, Larch: the five files changed on a branch, in their folders, each with its three state tick box, its M or A badge and its lines added and taken away. Tick a folder and the tick runs down its files one after another while its guide line lights up from the top; the folders above turn to a dash or a full tick and the Commit button rolls its numbers. Folders open on a spring, a pill slides under the row the hand is on and on commit the ticked rows fold away.
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>
<!--
"Changes tree" 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 changes tree with the ticks that run down the folders</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>
<main class="stage">
<!-- the source control panel of an invented code editor (Larch): the changed files of a branch in a tree, each with
a three state tick box. Ticking a folder sends the tick down its files one after another while its guide line
lights up, the folders above turn to a dash or a full tick, and the Commit button rolls its numbers. Committed,
the ticked rows fold away -->
<section class="panel" data-panel aria-labelledby="sc-title">
<span class="panel__glow" aria-hidden="true"></span>
<header class="panel__head">
<div class="panel__title">
<svg class="panel__mark" viewBox="0 0 16 16" aria-hidden="true">
<circle cx="4.5" cy="3.6" r="1.7" />
<circle cx="4.5" cy="12.4" r="1.7" />
<circle cx="11.5" cy="6.2" r="1.7" />
<path d="M4.5 5.3v5.4M11.5 7.9c0 2.2-2 2.9-4.4 3.4-1.3.3-2.2.6-2.6 1.1" />
</svg>
<h1 class="panel__name" id="sc-title">Source control</h1>
</div>
<div class="panel__branch">
<span class="panel__branch-name">feat/cart-totals</span>
<span class="panel__count" aria-label="Changed files"><span class="roll" data-changes>5</span></span>
</div>
</header>
<div class="tree" data-tree>
<span class="tree__pill" data-pill aria-hidden="true"></span>
<ul class="tree__root" role="tree" aria-labelledby="sc-title" data-root></ul>
</div>
<footer class="panel__foot">
<label class="msg">
<span class="sr">Commit message</span>
<input class="msg__input" type="text" value="Show price tags in the cart summary" spellcheck="false">
<kbd class="msg__keys" aria-hidden="true">
<svg viewBox="0 0 16 16"><path d="M5.2 4.8a1.6 1.6 0 1 1-1.6-1.6h8.8a1.6 1.6 0 1 1-1.6 1.6v6.4a1.6 1.6 0 1 1 1.6 1.6H3.6a1.6 1.6 0 1 1 1.6-1.6z" /></svg>
<svg viewBox="0 0 16 16"><path d="M12.6 3.4v4.4a2 2 0 0 1-2 2H3.6M6.4 6.6L3.4 9.8l3 3.2" /></svg>
</kbd>
</label>
<button class="commit" type="button" data-commit>
<span class="commit__run" data-run aria-hidden="true"></span>
<span class="commit__face" data-face>
<span class="commit__label roll" data-label>Commit</span>
<span class="commit__meta" data-meta>
<span class="roll" data-files>0 files</span>
<span class="commit__diff"><span class="is-add roll" data-add>+0</span><span class="is-del roll" data-del>−0</span></span>
</span>
</span>
</button>
</footer>
<svg class="hand" data-hand viewBox="0 0 24 24" aria-hidden="true">
<path d="M5.5 3.2 L5.5 18.4 L9.4 14.9 L12 20.6 L14.6 19.4 L12.1 13.9 L17.4 13.6 Z" />
</svg>
</section>
<p class="sr" data-live aria-live="polite"></p>
</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.
29 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 “Changes tree” from Animorio and fit it into my siteThe script builds the rows from a nested list (folders with their children, files with their kind, badge and lines): every folder is an li with its ul of children, which has two absolute guide lines, a grey one and a lit one over it, at 8 + depth times 14 + 7 pixels, under its chevron. The rows’ indent is a CSS variable, --depth.
Every box is a button with role checkbox and aria-checked true, false or mixed. A folder’s state is never stored: it is worked out again by counting its ticked files (none, all, some). Filling, the fill goes from 0.2 to 1 with back.out(SNAP), the box gives an elastic bounce, the tick (pathLength 1) draws itself with stroke-dashoffset and a ring widens and fades; between dash and tick the fill stays full and one stroke is wiped while the other draws. Every box keeps its own timeline and stops it when it changes again, so two quick clicks never leave the wrong drawing.
Ticking a folder all its files change at once in the data, but each is drawn CASCADE seconds later for its place among those that can be seen (those inside closed folders change without moving). Meanwhile the lit guide line goes from scaleY 0 to 1 in as long as the cascade lasts, then fades; the folders above are drawn again from the nearest to the farthest, 80 milliseconds apart.
Opening, the group of children goes from zero height to scrollHeight in OPEN seconds and then the written height is taken away; the chevron turns with back.out(3), the lid of the icon (a path of its own) leans with skewX and the children come down staggered. There is a single pill under the rows, moved by a spring (PILL, DAMP) worked out in 4 millisecond steps on GSAP’s ticker towards the row under the pointer, read again every frame: so it follows it even while a folder above opens. The faster it runs the taller it stretches, and the ticker stops when it is still.
Every number is a grid with a single cell: the new value comes in from below with back.out while the old one leaves upwards (the other way when it drops). On commit the rows that go are gathered (a folder ticked all through goes whole, otherwise only its ticked files), they slide right and then their height goes to zero, 70 milliseconds apart. The pretend hand is a timeline that stops at the first real click and starts again after seven seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
SNAP | script.js | 2.2 | How much a box springs when it fills: higher springs more, 1 not at all. |
CASCADE | script.js | 0.06 | The seconds between one file and the next when a folder sends its tick down. |
OPEN | script.js | 0.44 | The seconds a folder takes to open or close. |
PILL | script.js | 420 | The stiffness of the pill’s spring: higher reaches the row sooner. |
DAMP | script.js | 0.68 | The pill’s damping: lower goes past the row (0.4), 1 never passes it. |
PACE | script.js | 1 | The pretend hand’s pauses: higher waits longer between moves. |
LOOP | script.js | true | The pretend hand plays the story again and again. |
For the panel of a code editor, a developer tool or a dashboard with nested lists to choose from: a project’s folders, the permissions of a role, the categories of a filter, the files going into a backup. The three state box with the tick running down shows straight away what is being chosen and how much, and the button with the rolling numbers tells the result before confirming.
The same animation with adapted sizes: the panel is 92% of the screen wide, the rows, the header and the button are measured on the height too (clamp with vh), the branch name shortens with an ellipsis. With a finger the box or the row are tapped as with the mouse; the pill follows the pretend hand and the keyboard focus.
Nothing moves: the boxes fill and empty with a fade, the tick or dash already drawn, folders open with their files fading in, the pill goes straight to the row, the numbers change with a fade and on commit the rows fade away without sliding. The pretend hand is not shown: the story tells itself with the same choices.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.
Tested on 7 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.