Skip to content
animorio
IT
All components

Changes tree

Trees, Transitions, PhysicsGSAP, CSS onlyAdvancedCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>&#8722;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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a black background a dark panel whose edge catches the light at the top: Source control, the feat/cart-totals branch and the number of files changed, 5. Under it the tree: src with components (CartSummary.tsx modified, PriceTag.tsx added) and lib, closed, with currency.ts; tests with cart.test.ts; package.json. Every file has an icon drawn for its kind, its lines added in green and taken away in red and an amber M or green A badge; every row has its tick box. At the bottom the commit message and the violet Commit button with how many files and lines, dimmed while nothing is ticked. Ticking a folder its box fills with a bounce and the tick draws itself, then the tick runs down its files one after another, while the folder’s guide line lights up violet from the top and fades; the folder above turns to a dash when only some of it is ticked and to a full tick when all of it is, and the button’s numbers roll up (down when they drop). Clicking a folder its chevron turns on a spring, the lid of its icon leans back and the files come down staggered while the guide line grows. A light pill slides under the row the pointer is on, stretching a little as it runs. Pressing Commit, a light runs along the bottom of the button, the words become Committing, the ticked rows slide right and fold away (a folder ticked all through goes whole) and the button says Committed with a tick; the branch is left with 1. The pretend hand ticks components, opens lib, ticks currency.ts and package.json, takes PriceTag.tsx out and back in, commits and starts again.

How it works

The tree from a list

The 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.

The three state box

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.

The tick that runs down

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.

Folders on a spring and the pill

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.

Rolling numbers and the commit

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.

Values to change

NameFileDefaultWhat it changes
SNAPscript.js2.2How much a box springs when it fills: higher springs more, 1 not at all.
CASCADEscript.js0.06The seconds between one file and the next when a folder sends its tick down.
OPENscript.js0.44The seconds a folder takes to open or close.
PILLscript.js420The stiffness of the pill’s spring: higher reaches the row sooner.
DAMPscript.js0.68The pill’s damping: lower goes past the row (0.4), 1 never passes it.
PACEscript.js1The pretend hand’s pauses: higher waits longer between moves.
LOOPscript.jstrueThe pretend hand plays the story again and again.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • With cascades made of delayed timelines, two quick clicks on the same folder left the first drawing on top of the second (a full tick on a file taken out): every box keeps its own timeline and stops it before starting another.
  • The pill moved with a tween to the row’s place was left behind when a folder above opened: the place is read again every frame in a ticker, which turns off only when the pill is still and no folder is moving.
  • A file inside a closed folder animating with its own delay could not be seen but made the cascade longer: files that cannot be seen change at once, and the delay counts only the place among the visible ones.

Libraries

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.

Testing

Tested on 7 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components