Skip to content
animorio
IT
Back to the library

Sequence diagram

SVG, ScrollGSAPMediumCompressed weight: Demo 8.7 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The trace of one request on a made-up AI platform, Ondrel, in a dark panel for a software landing page: the stage stays still and as you scroll the four participants come in (the app, the gateway, the model, the tools), their dashed lifelines draw down and every message is drawn as an arrow with a pulse of light riding its tip. When the pulse lands the arrowhead pops, a ring opens on the receiving lifeline, the busy participant lights its border, the activation bars grow, the time of the step comes in on the right and the trace time in the header rolls up to 842 ms.

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>
<!--
  "Sequence diagram" 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>Ondrel, request trace</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 AI platform, Ondrel. A sticky stage with the sequence diagram of one request: scrolling, the four
       participants come in, their lifelines draw down, every message is drawn as an arrow with a pulse of light riding
       its tip, the busy participant lights up, the activation bars grow and the trace time rolls up to the answer -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <h2 class="titolo" data-titolo>Every request, traced end to end</h2>
      <figure class="pannello" data-pannello>
        <div class="testa">
          <span class="marchio">
            <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.6"/><path d="M8 2.4v11.2M2.4 8h11.2" opacity=".45"/><circle cx="8" cy="8" r="1.7" class="marchio__nucleo"/></svg>
            <span class="marchio__nome">Ondrel <span class="marchio__sotto">/ traces</span></span>
          </span>
          <span class="testa__destra">
            <span class="req">req_8f2a41</span>
            <span class="tempo"><b data-tempo>0</b> ms</span>
            <span class="esito" data-esito>200</span>
          </span>
        </div>
        <div class="corpo" data-corpo>
          <svg class="schema" data-schema aria-hidden="true"></svg>
        </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>
            Answered with 1 tool call
          </span>
          <span class="piede__dati">7 spans, 842 ms</span>
        </div>
      </figure>
    </div>
  </section>
  <footer class="fine">Ondrel is a made-up product. The trace is 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 “Sequence diagram” 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 near-black background there is a headline still in dark grey, Every request, traced end to end, and below it a dark panel with a thread of light on its top edge: Ondrel / traces, the request id and the time at zero. As you scroll the four participants come in one after another, App, Gateway, Model and Tools, each in its box with a drawn icon, rising eight pixels with the faintest bounce; their dashed lifelines draw down. Then the seven messages, one per row: the arrow draws from caller to receiver and an indigo pulse of light with a soft glow rides its tip; replies are dashed and grey, the key check is a small loop back onto the gateway. When the pulse lands the arrowhead pops, a thin ring opens on the receiving lifeline, its box lights an indigo border and the activation bars grow along the lines. Above every arrow there is its line of text (POST /v1/answers, verify key, prompt · 1.2k tok, search_orders(), 3 rows, stream · 214 tok, 200 OK) and the time of the step comes in on the right; in the header the trace time rolls up to 842 ms. At the end the headline lights up, the 200 pill pops in with a small bounce and the footer says Answered with 1 tool call, with the check drawing itself, and 7 spans, 842 ms. Hovering a step brightens its row and turns a dashed reply white.

How it works

The diagram in pixels

The script measures the stage and gives the panel the height that is left, then draws everything in an SVG as big as the panel body, with a viewBox in pixels: four equal lanes for the participants, a column on the right for the times and seven rows for the messages. On resize it rebuilds, even mid-animation.

Arrows that draw themselves

Every arrow is a real path, solid or dashed, under a mask: inside the mask the same path in white draws with stroke-dashoffset. This way the dashed replies draw too without losing their dashes.

The pulse of light

A piece of the same path, PULSE_LENGTH pixels long, rides the tip, made with a short dasharray and an offset that follows the drawing; a blurred copy with a Gaussian filter makes the glow, and a white dot sits on the head with getPointAtLength.

Who is working and how long it takes

The activation bars grow with a cursor that moves down row by row, the border of the participant that has just received lights up with a soft chase on the GSAP ticker and the time at the top rolls to the time of the step that landed.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole trace takes: 2 is twice as long.
SCRUBscript.js0.6How far the drawing lags behind the scroll, in seconds.
PULSE_LENGTHscript.js22The length of the pulse of light on each arrow, in pixels.
PULSE_GLOWscript.js0.8How bright the glow around the pulse is (0 none).
RING_SIZEscript.js10How wide the ring opens where a message lands, in pixels.
HEAD_LIFTscript.js8How far the participants rise when they come in, in pixels.
LINE_WIDTHscript.js1.3The thickness of the arrows, in pixels.

Try them in the Playground

When to use it

For the how it works section of the landing page of an AI platform, an API, an observability service or business software: instead of a still drawing, whoever scrolls sees the request travel from piece to piece and how long it takes.

On phones

The same animation with adapted sizes: the panel body takes the height left in the stage, the rows are sized on it, the participant boxes drop their icon, the request id and the word traces step aside; arrows, pulses, times and bars all stay.

With reduced motion

No motion: the trace is already fully drawn, with the arrows, the bars, the times, the 200 pill and the footer on, without pulses; the panel fades in.

Pitfalls

  • Dashed arrows cannot be drawn with stroke-dashoffset, which would share the dasharray of the dashes: the mask draws, not the arrow.
  • The SVG viewBox always matches the panel body in pixels and is rebuilt on resize: with a stretched viewBox the labels and arrowheads would warp.
  • The labels above the arrows cross the lifelines: an outline in the panel colour behind the text (paint-order: stroke) keeps them readable.
  • The border of the busy participant does not follow the scroll directly but chases it on the ticker: with scrub it would flicker going back and forth over the border between two steps.

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.7 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 10 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 animations