
Logo loader
Transitions, SVG, Text
The home page transition of an AI assistant for developers, on a soft near black page with grain: in the middle the glass prompt field with its iridescent edge. Once the question is sent the field lifts off and glides down in a FLIP transition, where it becomes the input bar of a full page chat that opens out of the field itself; meanwhile a wave of light leaves the field and an iridescent aurora spreads until it fills the background, then quiets down. The question rises as the first message, ‘Thinking’ shimmers and the answer streams in word by word, with a paragraph, a short list and a code block. Home closes the chat back into the field.
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>
<!--
"Prompt to chat 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 prompt field to chat transition with the aurora</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" data-stage>
<!-- the light behind everything: a small canvas, blurred and blended, that the script draws around the prompt field -->
<canvas class="aurora" data-aurora aria-hidden="true"></canvas>
<span class="veil" aria-hidden="true"></span>
<!-- the chat: a full page surface that opens out of the field (its clip follows the field while it flies) -->
<section class="chat" data-chat aria-label="Chat with Nacre">
<header class="chat__bar" data-bar>
<button class="chat__back" type="button" data-back aria-label="Back to home">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.5L5.5 8l4.5 4.5"/></svg>
<span>Home</span>
</button>
<p class="chat__title">Stale search results</p>
<span class="chat__share">Share</span>
</header>
<div class="chat__view" data-view>
<div class="chat__thread" data-thread>
<div class="me" data-me><p class="me__text" data-me-text></p></div>
<article class="ai" data-ai>
<header class="ai__who">
<span class="ai__mark" data-mark aria-hidden="true"><span class="ai__mark-face"></span></span>
<span class="ai__name">Nacre</span>
<span class="ai__think" data-think>Thinking</span>
</header>
<div class="answer" data-answer>
<p data-block>The old request is still in flight when the query changes, so a slow response can land last and overwrite the fresh one. Give every request its own <code>AbortController</code> and cancel it when the effect cleans up.</p>
<ul class="answer__list" data-block>
<li><strong>Abort, don’t ignore.</strong> The browser drops the response, so nothing parses late.</li>
<li><strong>Swallow the AbortError.</strong> It is expected, not a failure.</li>
<li><strong>Keep the query in the deps,</strong> so each keystroke cleans up the last call.</li>
</ul>
<figure class="code" data-block>
<figcaption class="code__head"><span>jsx</span><span class="code__copy"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5.5" y="5.5" width="7" height="7" rx="1.6"/><path d="M10.5 3.5h-5a2 2 0 0 0-2 2v5"/></svg>Copy</span></figcaption>
<pre class="code__body"><span class="k">useEffect</span>(() => {
<span class="k">const</span> ctrl = <span class="k">new</span> <span class="f">AbortController</span>();
<span class="f">fetch</span>(<span class="f">url</span>(query), { signal: ctrl.signal })
.<span class="f">then</span>((r) => r.<span class="f">json</span>())
.<span class="f">then</span>(setResults)
.<span class="f">catch</span>(() => {});
<span class="k">return</span> () => ctrl.<span class="f">abort</span>();
}, [query]);</pre>
</figure>
<p data-block>The same pattern works for any effect that loads data.</p>
</div>
<div class="ai__tools" data-tools aria-hidden="true">
<span class="tool"><svg viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="7" height="7" rx="1.6"/><path d="M10.5 3.5h-5a2 2 0 0 0-2 2v5"/></svg></span>
<span class="tool"><svg viewBox="0 0 16 16"><path d="M12.8 6.2A5 5 0 1 0 13 9.6"/><path d="M13.2 3.2v3.2H10"/></svg></span>
<span class="tool"><svg viewBox="0 0 16 16"><path d="M5 7.2V13H3.4V7.2zM5 7.2l2.6-4.1c.9 0 1.5.7 1.3 1.6L8.5 6.6h3.4c.8 0 1.4.8 1.2 1.6l-1 3.8c-.2.6-.7 1-1.3 1H5"/></svg></span>
<span class="ai__meta">2.1 s, 112 tokens</span>
</div>
</article>
</div>
</div>
<div class="chat__dock" data-dock aria-hidden="true"></div>
<p class="chat__fine">Nacre can make mistakes. Check code before you ship it.</p>
</section>
<!-- the home of Nacre, a made-up AI assistant for developers -->
<section class="home" data-home>
<nav class="nav" data-out>
<span class="nav__brand"><span class="nav__mark" aria-hidden="true"><span class="ai__mark-face"></span></span>Nacre</span>
<span class="nav__links"><span>Research</span><span>Pricing</span><span>Docs</span></span>
<span class="nav__in">Sign in</span>
</nav>
<div class="hero">
<p class="hero__tag" data-out>Nacre 2 now runs your code</p>
<h1 class="hero__title" data-out>What should we<br>figure out today?</h1>
<div class="hero__slot" data-slot aria-hidden="true"></div>
<div class="chips" data-out>
<button class="chip" type="button" data-chip>Explain a stack trace</button>
<button class="chip" type="button" data-chip>Draft a SQL query</button>
<button class="chip chip--wide" type="button" data-chip>Review my hook</button>
</div>
</div>
</section>
<!-- the prompt field: one element, placed by the script between the slot in the hero and the dock of the chat -->
<form class="prompt" data-prompt autocomplete="off">
<div class="prompt__glass" data-glass>
<span class="prompt__rim" data-rim aria-hidden="true"></span>
<div class="prompt__field">
<p class="prompt__mirror" aria-hidden="true"><span data-mirror></span><span class="prompt__caret" data-caret></span></p>
<span class="prompt__ph" data-ph aria-hidden="true">Ask Nacre anything</span>
<textarea class="prompt__input" data-input rows="2" aria-label="Ask Nacre anything" spellcheck="false"></textarea>
</div>
<div class="prompt__tools">
<span class="prompt__icon" aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M10.6 5.2L6 9.8a1.3 1.3 0 0 0 1.8 1.8l5-5a2.6 2.6 0 0 0-3.7-3.7L4 8a3.9 3.9 0 0 0 5.5 5.5L13 10"/></svg></span>
<span class="prompt__model" aria-hidden="true">Nacre 2<svg viewBox="0 0 16 16"><path d="M4.5 6.5L8 10l3.5-3.5"/></svg></span>
<span class="prompt__search" aria-hidden="true"><svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M2.5 8h11M8 2.5c1.6 1.6 2.3 3.5 2.3 5.5S9.6 11.9 8 13.5M8 2.5C6.4 4.1 5.7 6 5.7 8s.7 3.9 2.3 5.5"/></svg>Search</span>
<button class="prompt__send" type="submit" data-send aria-label="Send">
<span class="prompt__send-face" data-send-face><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 12.5v-9M4.2 7.2L8 3.4l3.8 3.8"/></svg></span>
</button>
</div>
</div>
</form>
<span class="grain" aria-hidden="true"></span>
<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.
78 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 “Prompt to chat transition” from Animorio and fit it into my siteThe prompt field is a single element, on top of everything. In the home there is an empty place as big as it is (the hero slot), at the bottom of the chat another one (the dock). On every frame the script reads the two rectangles and places the field between the first and the last by a number from 0 to 1 that GSAP moves with expo.inOut: it is a FLIP measured again and again, so the field lands in the right place even if the window changes size mid flight.
The chat is a full page surface with an inset clip-path: its four margins start from the field's own, read in the same frame while it flies, and fall to zero, with the corner radius going from 22 to 0. So the field's rectangle seems to widen to the edges, and the bar at the bottom seems to have been the field all along.
The light is a 2D canvas five times smaller than the page, blurred by the CSS and blended in screen: six radial gradients stretched sideways, in lighter blending, turn around the centre of the field. Two numbers drive them: burst (how far they drift and how big they grow, from a tight halo to the whole page) and energy (how bright they are). Sending takes energy to 1.2 and burst to 1 with expo.out, then lets them fall back to 0.5 and 0.62: that is the aurora quieting down. The wave is a rounded rectangle that widens with a conic gradient.
At start the script cuts the answer into words, each in a span: in the code the spaces and line breaks stay real. A counter goes from zero to the number of words at a constant speed (code words count as half, so the code runs twice as fast) and each word it reaches settles out of a 4 pixel blur. Each block starts hidden and appears when its first word arrives, and the thread scrolls itself towards the last line on a soft spring.
The iridescent edge is a conic gradient inside a one pixel mask, turned by the --a variable; when sending and when landing it lights up with flare. The field's text is a mirror over a transparent textarea, with a drawn caret; ‘Thinking’ is text with a moving gradient background. The automatic walk is a single GSAP timeline that starts from the load event; as soon as someone touches the field, a suggestion or Home, the walk stops and the page stays in their hands.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE_SPEED | script.js | 24 | How many letters per second while the question is typed. |
WORD_SPEED | script.js | 24 | How many words per second the answer streams. |
FLIGHT | script.js | 1.15 | How long the field's flight between the middle and the bottom lasts, in seconds. |
AURORA | script.js | 1 | How bright the aurora is. |
SPREAD | script.js | 1 | How far the aurora spreads when the question is sent. |
SHIFT | script.js | 1 | How fast the colours of the aurora and of the edge drift. |
READ | script.js | 2.8 | How many seconds the finished answer stays before going Home on its own. |
GRAIN | script.js | 0.07 | How strong the grain is. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the walk: type, send, read and go back Home. |
For the home or the landing page of an AI product (an assistant, a coding copilot, a search engine that answers, a help centre that talks back): wherever the first screen already is the question field and the conversation has to grow out of it without a page jump. The colours are --violet, --cyan, --rose, --amber and --page in the CSS; the answer is plain HTML in the file and the script cuts it up by itself.
The same transition at adapted sizes: the field is as wide as the window minus the margins and as tall as the height allows, the heading, the answer and the code are measured on width and height, and the code is written short so it fits; on narrow screens the menu links, the third suggestion, ‘Search’ and ‘Share’ go, on short ones the pill at the top and the line at the bottom. The chat scrolls itself to keep the last line in view. With a finger you tap the field, type and send.
No movement: the field fades out in the middle and back in at the bottom, the chat fades in without opening out of the field, the aurora brightens without spreading and without the wave, the question, the words of the answer and the home come and go only by fading, without blur; the caret does not blink and the colours stay still.
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 13 KB; the libraries: GSAP 28 KB.
Tested on 4 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.