
The liquid grid
Hover, Transitions
The page transition of a made-up AI search engine, Velin, on a warm paper ground: in the middle the white field with its soft shadow and a blue light behind it. The question is typed and Enter is pressed: the field rises and shrinks around the words, which grow into the title of the answer page, then the field’s shell dissolves. Below, the sources come in as four small cards that start from the middle and spread into a row on a staggered spring, each with its drawn favicon, domain and title; “Reading 4 sources” shimmers and the answer writes itself line by line. Every citation number pops into its line and a thin line hooks it to its card, which lights up and lifts by three pixels. Back plays the whole gesture in reverse.
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>
<!--
"Answer page transition" 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 question to answer page transition with the sources in a row</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" data-stage>
<!-- Velin, a made-up AI search engine. The question is typed in the field in the middle and sent with Enter:
the field rises and shrinks into the title of the answer page, the sources come in as small cards that
spread into a row on a staggered spring, and the answer writes itself line by line, each citation number
hooking onto its card with a thin line. Back plays the whole gesture in reverse -->
<span class="glow" data-glow aria-hidden="true"></span>
<header class="brand" aria-label="Velin">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3.2 4.5 10 16.2 16.8 4.5"/>
<path class="brand__beam" d="M6.6 4.5 10 10.4 13.4 4.5"/>
</svg>
<span class="brand__name">Velin</span>
</header>
<section class="home" data-home>
<h1 class="home__head" data-out>Ask anything. <span>See where it comes from.</span></h1>
<div class="home__slot" data-slot-home></div>
<p class="home__hint" data-out>Press <kbd data-kbd>Enter</kbd> to search 2.4 billion pages</p>
</section>
<section class="page" data-page aria-label="Answer">
<div class="page__col" data-col>
<button class="back" type="button" data-back>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.8 3.6 5.4 8l4.4 4.4"/></svg>
<span>Back</span>
</button>
<div class="page__title-slot" data-slot-title></div>
<p class="page__meta" data-meta>
<span>Sources</span>
<span class="page__meta-n">4 pages read in 0.8 s</span>
</p>
<ol class="sources" data-sources>
<li class="source" data-source="1">
<span class="source__top">
<svg class="fav fav--a" viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" rx="5.5"/><path d="M6 7.2h8M6 10h8M7.5 12.8h5"/></svg>
<span class="source__domain">kettleandbean.com</span>
<span class="source__n">1</span>
</span>
<span class="source__title">Cold brew, measured: caffeine cup by cup</span>
</li>
<li class="source" data-source="2">
<span class="source__top">
<svg class="fav fav--b" viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" rx="5.5"/><circle cx="10" cy="10" r="4.2"/><path d="M10 5.8v8.4"/></svg>
<span class="source__domain">baristahandbook.org</span>
<span class="source__n">2</span>
</span>
<span class="source__title">Espresso ratios and what a shot holds</span>
</li>
<li class="source" data-source="3">
<span class="source__top">
<svg class="fav fav--c" viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" rx="5.5"/><path d="M5.6 13.6 10 6l4.4 7.6z"/></svg>
<span class="source__domain">groundsquarterly.com</span>
<span class="source__n">3</span>
</span>
<span class="source__title">Why the big cup is the strong one</span>
</li>
<li class="source" data-source="4">
<span class="source__top">
<svg class="fav fav--d" viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" rx="5.5"/><path d="M5.4 11.6c1.5-2.6 3-2.6 4.6 0s3.1 2.6 4.6 0"/><path d="M5.4 8.2c1.5-2.6 3-2.6 4.6 0s3.1 2.6 4.6 0"/></svg>
<span class="source__domain">acidityreport.net</span>
<span class="source__n">4</span>
</span>
<span class="source__title">Cold water and the acids it leaves behind</span>
</li>
</ol>
<div class="status" data-status>
<span class="status__reading" data-reading>Reading 4 sources</span>
<span class="status__answer" data-answer-label>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8c.5 3.3 2.9 5.7 6.2 6.2-3.3.5-5.7 2.9-6.2 6.2-.5-3.3-2.9-5.7-6.2-6.2 3.3-.5 5.7-2.9 6.2-6.2z"/></svg>
Answer
</span>
</div>
<p class="answer" data-answer>Shot for shot, espresso is stronger: about 63 mg of caffeine in a single 1 oz shot <b class="cite" data-cite="2">2</b>. A 16 oz cold brew carries 200 mg or more, so the whole cup usually wins <b class="cite" data-cite="1">1</b><b class="cite" data-cite="3">3</b>. It tastes milder because cold water pulls out fewer acids <b class="cite" data-cite="4">4</b>.</p>
<p class="page__foot" data-foot>Answered in 1.2 s from 4 sources</p>
</div>
</section>
<!-- the field that flies: its glass shell and the words, which become the title of the page -->
<form class="ask" data-ask autocomplete="off">
<div class="ask__shell" data-shell>
<svg class="ask__lens" data-lens viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.4"/><path d="m10.3 10.3 3.2 3.2"/></svg>
<input class="ask__input" data-input type="text" maxlength="48" aria-label="Ask Velin" spellcheck="false">
<button class="ask__send" type="submit" data-send aria-label="Search">
<span class="ask__send-face" data-send-face>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 12.6V3.6M4.2 7.2 8 3.4l3.8 3.8"/></svg>
</span>
</button>
</div>
<span class="ask__text" data-text aria-hidden="true"><span data-words></span><span class="ask__ph" data-ph>Ask anything</span><i class="ask__caret" data-caret></i></span>
</form>
<span class="measure" data-measure aria-hidden="true"></span>
<svg class="hooks" data-hooks aria-hidden="true"></svg>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true">
<path d="M5.5 3.2v15.6l4.1-3.9 2.6 5.9 2.6-1.1-2.6-5.8h5.6z"/>
</svg>
<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.
51 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 “Answer page transition” from Animorio and fit it into my siteThe home has an empty slot as big as the field, the answer page an empty slot as tall as the title. The real field (shell and words) sits above everything, absolutely positioned, and on every frame it reads both slots with getBoundingClientRect and places itself between them by one number, fly, from 0 to 1: it lands right even if the window changes size mid flight.
The question is written once, at the title’s size, and scaled down in the field: so the flight is just translate and scale, with no text reflow. Both sizes are measured on a hidden span at 100 px, and both shrink if the question does not fit on one line (on a phone the title stays on a single line).
The white shell goes from the field’s rectangle to the words’ rectangle plus a margin, so it hugs the question as it rises; the lens and the button withdraw in the first third of the flight, the shell fades in the last half. On arrival a 1.2 px tween and an elastic give the extra pixel and the settle.
Each card starts moved towards the middle of the row by half its distance (worked out with offsetLeft, which ignores transforms), lower and at 90%, and reaches its place with back.out and a 0.08 s stagger. Back does the same in reverse, from the last one, with power2.in.
The answer is split into words (the numbers stay whole) and the words are grouped by offsetTop: each group is a line as it really is at that width, and the lines come in one after the other. Every number has its own moment in the timeline.
An SVG as big as the page, under the text: from the number to the card a vertical Bézier curve is built, measured with getTotalLength and drawn with stroke-dashoffset. At the end the card takes the class that lights its number and jumps three pixels on an elastic; the line fades. Hovering uses the same function but keeps the line.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE_SPEED | script.js | 22 | Letters per second while the question types itself. |
FLIGHT | script.js | 0.95 | Seconds of the field’s flight up into the title. |
CARD_STAGGER | script.js | 0.08 | Seconds between one source card and the next. |
CARD_SPRING | script.js | 1.5 | How far the cards pass their place before they settle (0 = none). |
LINE_STAGGER | script.js | 0.34 | Seconds between one line of the answer and the next. |
HOOK_TIME | script.js | 0.42 | Seconds the thin line takes to hook a number to its card. |
READ | script.js | 2.2 | Seconds the finished answer stays still before the walk on its own goes on. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Types, sends and goes back again and again. |
For an AI search engine or assistant that answers with its sources, a knowledge base, a product’s help centre, a search across a team’s documents. When the question should not vanish but become the title of the answer, and it should be clear at once where each sentence comes from.
The same gesture with adapted sizes: the title shrinks to stay on one line, the cards in the row show favicon, number and domain (the source title hides under 520 px), text sizes and gaps follow the height too. A tap on a number draws the hook and lights the card for a second and a half.
No flight and no movement: the field fades and the question reappears already in place as the title, cards, lines and numbers fade in, the hooks are not drawn but the cards still light up. Back is the same fade in reverse.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 11 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.