Skip to content
animorio
IT
Back to the library

Commit history branches

Scroll, SVGGSAPMediumCompressed weight: Demo 8.6 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The commit history of a repository on a made-up code host, Fernwick, in the clean style of product interfaces: the stage stays still and as you scroll the main line grows downwards, a feature branch and a hotfix peel off to the side on soft curves and come back in, every commit closes its ring on the line with a small pop, its row slides in beside it, HEAD rides to the newest commit on a short spring, the count in the header rolls up and the two merges get their release tag. At the end the footer says the branch is up to date.

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>
<!--
  "Commit history branches" 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>Fernwick, commit history</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/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- a made-up code host, Fernwick. A sticky stage with the commit history of a repository: scrolling, the main line
       grows downwards, two branches peel off to the side and come back in, every commit closes its ring on the line,
       the row slides in next to it, HEAD follows the newest commit on a spring and the two releases get their tag -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <h2 class="titolo" data-titolo>What changed this week</h2>
      <figure class="pannello" data-pannello>
        <div class="testa" data-testa>
          <span class="repo">
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 2.5h7l2 2v9h-9z"/><path d="M5.5 6.5h5M5.5 9h5M5.5 11.5h3"/></svg>
            <span class="repo__nome"><span class="repo__org">fernwick /</span> billing-web</span>
          </span>
          <span class="testa__destra">
            <span class="ramo">
              <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="5" cy="3.5" r="1.6"/><circle cx="5" cy="12.5" r="1.6"/><circle cx="11" cy="5.5" r="1.6"/><path d="M5 5.1v5.8M11 7.1c0 2.6-6 2.2-6 3.8"/></svg>
              main
              <svg class="ramo__giu" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5 8 10l3.5-3.5"/></svg>
            </span>
            <span class="conto"><b class="conto__n" data-conto>0</b> commits</span>
          </span>
        </div>
        <div class="corpo" data-corpo>
          <div class="fascia" data-fascia aria-hidden="true"></div>
          <svg class="grafo" data-grafo aria-hidden="true"></svg>
          <ol class="righe" data-righe></ol>
          <span class="head" data-head aria-hidden="true">HEAD</span>
        </div>
        <div class="piede" data-piede>
          <span class="piede__stato">
            <svg viewBox="0 0 16 16" aria-hidden="true"><path class="piede__spunta" d="M4 8.4 6.8 11 12 5.2"/></svg>
            Up to date with origin/main
          </span>
          <span class="piede__uscita">Released v2.5.0</span>
        </div>
      </figure>
    </div>
  </section>
  <footer class="fine">Fernwick is a made-up product. Names and commits are illustrative.</footer>

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

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.

28 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 “Commit history branches” 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 white background there is a headline still in light grey, What changed this week, and below it a white panel with the header of the fernwick / billing-web repository, a pill with the main branch and the commit count at zero. As you scroll, in the left column the black main line grows downwards; at the third commit a blue line peels off to the side on a soft curve, the feature/receipts branch, and further down a grey line does the same, the hotfix/eu-tax fix. Every commit closes its ring on the line, which swells for a moment and settles; beside it its row comes in, sliding twelve pixels: the message, the label of the branch where it starts, the avatar and name of who wrote it, the hash in a monospaced font and how long ago. The black HEAD pill rides to the newest commit on a short spring, with a very light grey band under the row, and the count at the top rolls up; the older rows step back a little. The two lines come back into main on another curve: the merge ring fills, gets a thin halo and the release tag, v2.4.1 and v2.5.0, comes in with a small bounce. At the end the headline turns black and the footer says Up to date with origin/main, with the check drawing itself, and Released v2.5.0. Hovering a row shows the copy icon next to the hash; clicking turns it into a check.

How it works

The graph in pixels

The script measures the stage and works out the row height so the whole panel fits, on the phone too; then it draws the lines in an SVG as big as the left column. Each line goes from a commit to its parent: straight on the same lane, with a half-row cubic curve when a branch peels off or comes back.

Lines that grow on scroll

A scrubbed ScrollTrigger takes a number from 0 to 1. Each line draws with stroke-dashoffset between half a step after the parent and just before the child, so the lines grow steadily downwards; the commit ring closes with the same trick on its circumference, rotated by minus 90 degrees so it starts from the top.

HEAD on a spring

The HEAD pill and the band under the row do not follow the scroll directly: they chase the newest commit with a hand-written spring on the GSAP ticker (stiffness and damping are two knobs), so when a new commit arrives they slide down with the faintest bounce.

Rows and tags

Each row slides in on a slowing curve, the older ones lose some opacity as new ones arrive, the release tags come in with a small bounce and the count at the top rolls at every new commit.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole history takes: 2 is twice as long.
SCRUBscript.js0.6How far the drawing lags behind the scroll, in seconds.
HEAD_STIFFNESSscript.js320How hard HEAD is pulled to the newest commit.
HEAD_DAMPINGscript.js26How quickly HEAD stops wobbling: lower bounces more.
RING_POPscript.js0.22How much a commit ring swells when it closes (0 none).
PAST_FADEscript.js0.38How much the older rows step back (0 none).
LINE_WIDTHscript.js1.6The thickness of the branch lines, in pixels.

Try them in the Playground

When to use it

For the what’s new or release page of a developer tool, the landing page of a code host, a CI or review service, or a case study telling how a version came together: whoever scrolls sees the work split and come back together, instead of reading a list.

On phones

The same animation with adapted sizes: rows are sized on the stage height so the whole panel fits, the graph narrows, and on narrow cards the author, the time and the release note step aside; the hash, the tags and HEAD stay.

With reduced motion

No motion: the history is already fully drawn, with the branches, the closed rings, the tags, HEAD on the newest commit and the footer on; the panel fades in.

Pitfalls

  • The SVG viewBox always matches the column in pixels and is rebuilt on resize: with a stretched viewBox the rings would not land beside the HTML rows.
  • The ring starts from the top only if the circle is rotated by minus 90 degrees around its centre: an SVG circle’s stroke starts on the right.
  • HEAD follows a spring, not the scroll: following the scroll it would jump from row to row with no weight, and with scrub it would stop between two rows.
  • The long main lines draw between parent and child over all the time in between, not only when the child arrives: otherwise the line would stay broken for two rows.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.6 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 30 October 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 animations