
The inchworm menu
Menus, Hover, Transitions
The tool call block of Juniper, Kestrel’s made-up travel agent, inside the chat: asked for a flight to Lisbon, the agent calls search_flights and the card writes its arguments as tidy JSON, keys in grey and values in violet, then asks for permission with Approve and Deny. Once approved the spinner turns and a thin line runs under the header while the seconds count; at «Done · 1.2s» the tick draws itself in the circle, the arguments fold into a single line and three flights spring open below, the cheapest one marked. The header folds and unfolds the card. On white, with a single violet accent.
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>
<!--
"Tool call card" 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>Tool call card</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">
<!-- a chat with Juniper, the made-up travel agent of Kestrel: the user asks for a flight,
the agent calls a tool. The tool call card writes its arguments, asks for approval,
runs, and opens its result; a click on the header folds it -->
<section class="chat" data-chat aria-label="Chat with Juniper, the Kestrel travel agent">
<div class="msg msg--user" data-user>
<p>Find me a flight to Lisbon on Friday, under €200.</p>
</div>
<article class="tool" data-tool>
<span class="tool__light" aria-hidden="true"></span>
<button class="head" type="button" data-head aria-expanded="true" aria-controls="tool-body">
<span class="head__ico" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M17.8 19.2L16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z"/></svg>
</span>
<span class="head__name">
<code>search_flights</code>
<span class="head__src">Kestrel Flights</span>
</span>
<span class="state" data-state>
<span class="state__ico" aria-hidden="true">
<svg class="i-wait" data-i="wait" viewBox="0 0 20 20"><circle cx="10" cy="10" r="6.6"/><path d="M10 6.6V10l2.2 1.6"/></svg>
<svg class="i-spin" data-i="spin" viewBox="0 0 20 20"><circle class="spin__track" cx="10" cy="10" r="6.6"/><circle class="spin__arc" cx="10" cy="10" r="6.6" pathLength="1"/></svg>
<svg class="i-done" data-i="done" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7.4"/><path class="tick" d="M6.8 10.2l2.2 2.2 4.3-4.6" pathLength="1"/></svg>
<svg class="i-no" data-i="no" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7.4"/><path class="cross" d="M7.4 7.4l5.2 5.2M12.6 7.4l-5.2 5.2" pathLength="1"/></svg>
</span>
<span class="state__txt" data-state-txt>Needs approval</span>
</span>
<svg class="chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.2L8 9.8l3.5-3.6"/></svg>
</button>
<span class="run" aria-hidden="true"><span class="run__bar" data-run></span></span>
<div class="body" id="tool-body" data-body>
<div class="body__in">
<pre class="args" data-args aria-label="Arguments"></pre>
<p class="summary" data-summary aria-hidden="true">
<span>LHR</span>
<svg viewBox="0 0 16 10"><path d="M1 5h13M10.4 1.6L14 5l-3.6 3.4"/></svg>
<span>LIS</span><span class="sep">·</span><span>Fri 4 Dec</span><span class="sep">·</span><span>under €200</span>
</p>
<div class="ask" data-ask>
<p class="ask__q">Allow <b>Juniper</b> to search flights?</p>
<div class="ask__btns">
<button class="btn btn--ghost" type="button" data-deny><span>Deny</span></button>
<button class="btn btn--go" type="button" data-approve data-autoclic><span>Approve</span></button>
</div>
</div>
<ul class="results" data-results aria-label="Result">
<li class="row">
<span class="row__tag" aria-hidden="true"><span>TP</span></span>
<span class="row__main"><b>07:10 – 09:45</b><span>TAP Air Portugal · Direct</span></span>
<span class="row__price">€148</span>
</li>
<li class="row row--best">
<span class="row__tag" aria-hidden="true"><span>U2</span></span>
<span class="row__main"><b>11:35 – 14:10</b><span>easyJet · Direct</span></span>
<span class="row__price">€96<span class="best">Cheapest</span></span>
</li>
<li class="row">
<span class="row__tag" aria-hidden="true"><span>BA</span></span>
<span class="row__main"><b>17:20 – 19:55</b><span>British Airways · Direct</span></span>
<span class="row__price">€184</span>
</li>
</ul>
</div>
</div>
</article>
<div class="msg msg--ai" data-reply>
<span class="msg__who" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M10 2.6c.5 3.9 3.5 6.9 7.4 7.4-3.9.5-6.9 3.5-7.4 7.4-.5-3.9-3.5-6.9-7.4-7.4 3.9-.5 6.9-3.5 7.4-7.4z"/></svg>
</span>
<p data-reply-txt></p>
</div>
<p class="sr" aria-live="polite" data-live></p>
</section>
</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.
44 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Tool call card” from Animorio and fit it into my siteThe JSON is a list of lines made of pieces (key, value, punctuation), each with its colour class. To write it, a character count is animated from 0 to the total and at every step the HTML up to there is rebuilt, with the caret at the end: the colours are there while it types.
Every change of the card (the question leaving, the arguments becoming one line, the flights arriving) goes through one function: it measures the height before, changes the content, measures the new height and animates it on a spring, then sets it back to auto.
The four state icons (waiting, spinner, tick, cross) are stacked svgs in a fixed square: they swap with a fade and a scale from their centre, so nothing shifts. The spinner turns the whole svg with transformOrigin 50% 50%.
Tick and cross have pathLength 1 and stroke-dashoffset from 1 to 0; autoRound is off, otherwise GSAP would round to pixels and the tick would pop in at once.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE_SPEED | script.js | 48 | Characters per second while the agent writes the arguments. |
RUN_TIME | script.js | 1.2 | Seconds the tool runs before the result comes back. |
SPRING | script.js | 0.7 | How springy the card is when it opens and changes (lower = more bounce). |
AUTO_APPROVE | script.js | 1.6 | Seconds of waiting before the demo approves by itself. |
AUTO_PAUSE | script.js | 5 | Seconds of quiet before the demo starts over. |
In apps with an AI assistant or agent that uses tools and connectors (MCP): it shows what it is about to do, asks for permission, says when it is working and how long it takes, and lets you read the result without flooding the chat.
Everything is in em and the size depends on both the width and the height of the window; once the flights arrive the arguments become a single line, so the card stays short even in the phone box. A tap works like a click.
No springs or movement: the arguments appear whole, the spinner doesn’t turn and the line doesn’t run, the icons, the flights and the reply fade in.
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 8.0 KB; the libraries: GSAP 28 KB.
Tested on 29 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.
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.