
The send button
Buttons, Transitions, SVG
The comment thread on one frame of a design file, in a dark card like a Dribbble shot: the replies hang from the comment above on thin branches drawn in SVG. Opening the replies the branches grow out of the avatar and bend with a round elbow towards each reply, the replies settle one after the other with a pixel of bounce, a small light runs down every new branch and the open comment's avatar takes a thin ring. Votes roll their number, the replies chip rolls its words and turns its chevron on a spring.
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>
<!--
"Branching comment thread" 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 comment thread with branches that open</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 comment thread on a frame of a design file, in an invented design tool (Kestrel). The replies hang from
their parent on thin branches drawn in SVG: opening a thread the branches grow out of the avatar, the
replies settle in one after the other and a small light runs down each new branch -->
<div class="ct" data-wrap>
<span class="ct__glow" aria-hidden="true"></span>
<article class="ct__card" data-card aria-label="Comments on Checkout, Frame 12">
<span class="ct__shine" data-shine aria-hidden="true"></span>
<header class="ct__head">
<span class="ct__file">
<svg class="ct__frame" viewBox="0 0 16 16" aria-hidden="true"><path d="M5 2.5v11M11 2.5v11M2.5 5h11M2.5 11h11"/></svg>
<span class="ct__name">Checkout</span>
<span class="ct__sep">/</span>
<span class="ct__muted">Frame 12</span>
</span>
<span class="ct__state">Open</span>
</header>
<div class="ct__thread" data-thread>
<svg class="ct__branches" data-branches aria-hidden="true">
<defs>
<filter id="ct-glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="2.2"/></filter>
</defs>
</svg>
<div class="c c--root" data-c="mara">
<span class="c__av c__av--peach" data-av>MO</span>
<div class="c__body">
<p class="c__meta">
<span class="c__who">Mara Okafor</span><span class="c__time">2h</span>
<button class="vote" type="button" data-vote aria-pressed="false" aria-label="Upvote, 14">
<svg class="vote__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 9.6 8 6.1l3.5 3.5"/></svg>
<span class="vote__n" data-n>14</span>
</button>
</p>
<p class="c__text">Can the order total live in the sticky bar? It gets lost on small screens.</p>
<button class="more" type="button" data-more="mara" aria-expanded="false" aria-controls="kids-mara">
<span class="more__faces" aria-hidden="true"><span class="c__av c__av--mini c__av--blue">TL</span><span class="c__av c__av--mini c__av--mint">IR</span></span>
<span class="more__label" data-label data-closed="2 replies" data-opened="Hide replies"><span>2 replies</span></span>
<svg class="more__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.4 8 9.9l3.5-3.5"/></svg>
</button>
</div>
</div>
<div class="kids" id="kids-mara" data-kids="mara">
<div class="kids__in">
<div class="c" data-c="theo" data-parent="mara">
<span class="c__av c__av--blue" data-av>TL</span>
<div class="c__body">
<p class="c__meta">
<span class="c__who">Theo Lind</span><span class="c__time">1h</span>
<button class="vote" type="button" data-vote aria-pressed="false" aria-label="Upvote, 6">
<svg class="vote__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 9.6 8 6.1l3.5 3.5"/></svg>
<span class="vote__n" data-n>6</span>
</button>
</p>
<p class="c__text">Tried it. It hides the promo field.</p>
<button class="more" type="button" data-more="theo" aria-expanded="false" aria-controls="kids-theo">
<span class="more__faces" aria-hidden="true"><span class="c__av c__av--mini c__av--mint">IR</span></span>
<span class="more__label" data-label data-closed="1 reply" data-opened="Hide"><span>1 reply</span></span>
<svg class="more__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.4 8 9.9l3.5-3.5"/></svg>
</button>
</div>
</div>
<div class="kids kids--deep" id="kids-theo" data-kids="theo">
<div class="kids__in">
<div class="c" data-c="ines" data-parent="theo">
<span class="c__av c__av--mint" data-av>IR</span>
<div class="c__body">
<p class="c__meta">
<span class="c__who">Ines Ruiz</span><span class="c__time">48m</span>
<button class="vote" type="button" data-vote data-auto-vote aria-pressed="false" aria-label="Upvote, 8">
<svg class="vote__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 9.6 8 6.1l3.5 3.5"/></svg>
<span class="vote__n" data-n>8</span>
</button>
</p>
<p class="c__text">Make the promo a link above it?</p>
</div>
</div>
</div>
</div>
<div class="c" data-c="ines2" data-parent="mara">
<span class="c__av c__av--mint" data-av>IR</span>
<div class="c__body">
<p class="c__meta">
<span class="c__who">Ines Ruiz</span><span class="c__time">40m</span>
<button class="vote" type="button" data-vote aria-pressed="false" aria-label="Upvote, 3">
<svg class="vote__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 9.6 8 6.1l3.5 3.5"/></svg>
<span class="vote__n" data-n>3</span>
</button>
</p>
<p class="c__text">And tabular figures, so no jumps.</p>
</div>
</div>
</div>
</div>
</div>
</article>
</div>
<p class="sr" aria-live="polite" data-live></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.
48 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 “Branching comment thread” from Animorio and fit it into my siteEvery reply list is a box with height 0 and overflow hidden. Opening it GSAP goes from the current height to the content's with expo.out and then sets height auto, so a reply opened further down stretches it by itself; closing it goes back to 0 with power3.inOut.
An SVG as big as the thread holds one path for each reply: it starts under the parent's avatar, runs down with V, bends with an 8 pixel A arc and reaches the reply's avatar with H. The positions come from getBoundingClientRect divided by the page's scale, recomputed every frame but written only when they change.
With pathLength 1 and strokeDasharray 1 1, each branch grows by taking strokeDashoffset from 1 to 0, staggered like the replies. The running light is a dash 0.16 long on two copies of the same path, one sharp and one through a feGaussianBlur.
The chip and the vote put the new word next to the old one in a window one line tall: one rises with yPercent and fades, the other comes up from below with back.out; meanwhile the width goes from the old size to the new one and is then set free.
Every tap squeezes the button to 0.93 in 0.09 seconds and brings it back with elastic.out; the vote's chevron jumps 3.5 pixels and springs back, the open avatar's ring grows with back.out through a CSS variable.
| Name | File | Default | What it changes |
|---|---|---|---|
SPEED | script.js | 1 | 2 = everything twice as fast, 0.5 = half. |
BRANCH_TIME | script.js | 0.7 | How long a branch takes to grow, in seconds. |
STAGGER | script.js | 0.09 | The delay between one reply and the next, in seconds. |
BOUNCE | script.js | 1.7 | How far the replies pass their place before settling (0 = none). |
ELBOW | script.js | 8 | The radius of the branch's turn, in pixels. |
PULSE | script.js | true | A small light runs down every branch that opens. |
LOOP | script.js | true | Left alone, the thread opens and folds again and again. |
For the comments of a design or review app, for the discussions of a forum or a community, for the replies under an article or a product: wherever a conversation has nested replies to open without losing who answers whom.
The same animation with adapted sizes: the card is almost as wide as the screen, type and spacing shrink with the height, the branches recompute themselves and a finger opens the replies and votes.
Nothing moves: the replies appear and disappear with a fade, the branches appear whole, numbers and words change with a fade and the light does not run.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.2 KB; the libraries: GSAP 28 KB.
Tested on 2 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.