
The liquid glass button
Buttons, WebGL, Hover, Physics
An AI assistant’s reply, on near black: next to its name a small orb of liquid light, violet and blue, slowly wobbles like a drop. While it thinks it tightens, churns faster and the word Thinking shimmers; when the answer starts the orb lets go with a small bounce and the words arrive one at a time below it, then it settles.
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>
<!--
"Thinking orb loader" 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 thinking orb loader while the assistant replies</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">
<!-- an AI assistant's reply, on near black: the question on the right, and on the left a small orb of liquid light
that is the assistant itself. While it thinks the orb tightens and churns faster, when the answer starts it
relaxes and the words arrive one by one under it -->
<section class="thread" data-thread aria-label="Teyla assistant" aria-live="polite">
<p class="ask" data-ask></p>
<div class="reply">
<div class="reply__head">
<div class="orb" data-orb>
<span class="orb__glow" data-glow aria-hidden="true"></span>
<canvas class="orb__canvas" data-canvas aria-hidden="true"></canvas>
<span class="orb__fallback" data-fallback aria-hidden="true"></span>
</div>
<div class="reply__meta">
<span class="reply__name">Teyla</span>
<span class="reply__status" data-status>
<span class="status status--think" data-think>Thinking</span>
<span class="status status--done" data-done>Thought for 2s</span>
</span>
</div>
</div>
<p class="answer" data-answer></p>
<div class="tools" data-tools>
<button class="tool" type="button" aria-label="Copy answer">
<svg viewBox="0 0 20 20" aria-hidden="true"><rect x="7" y="7" width="9" height="9" rx="2"></rect><path d="M13 4.5H6.5a2 2 0 0 0-2 2V13"></path></svg>
</button>
<button class="tool" type="button" aria-label="Regenerate" data-again>
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M15.5 10a5.5 5.5 0 1 1-1.7-4"></path><path d="M14.4 3.2v3.4H11"></path></svg>
</button>
</div>
</div>
</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.
18 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 “Thinking orb loader” from Animorio and fit it into my siteThe orb is a single fragment shader on a small WebGL canvas, larger than the orb so the halo fits. For each pixel it takes the angle from the centre and the radius of the edge, which wobbles with three sines of different frequencies (2, 3 and 5 waves per turn, plus one of 7 while thinking) moving in time; the edge is smoothed over one pixel, so it stays clean at any size.
Inside the drop a sphere is faked: the depth z and the normal come from the distance to the centre. Two bands of sines warping each other mix the two colours, the colour darkens towards the rim, a bright thread runs where the bands meet. The fresnel, (1 − z) to the 2.4, lights the rim like glass, and a tight specular highlight plus a broad one make the light.
An object with amplitude, size, speed, glow and swirl is the only thing GSAP animates: at rest, while thinking (power3.out in 0.6 seconds: tighter, busier, brighter) and when answering (back.out to 1.07, then elastic.out back to 1). The shader reads these numbers every frame, so the states cross over without jumps.
The shader’s time is not the clock: every frame it grows by the time elapsed multiplied by the state’s speed. So the liquid speeds up and slows down smoothly, instead of jumping ahead as it would if the clock were multiplied by the speed.
One timeline per question: the bubble comes in with back.out, Thinking shimmers with a CSS variable sliding a gradient inside the letters (background-clip: text), then the answer, already split into words, comes in with a 55 millisecond stagger, each word from 4 pixels lower and blurred by 4. At the end the timeline calls the next question.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #8b7bff | The main colour of the orb. |
ACCENT_2 | script.js | #6fc3ff | The shade that flows inside the orb and lights its rim. |
SPEED | script.js | 1 | How much the liquid moves at rest. |
INTENSITY | script.js | 1 | How much the orb wobbles and how strong the glow is. |
THINK_SPEED | script.js | 3.2 | How many times faster the liquid churns while thinking. |
THINK_TIME | script.js | 1.9 | The seconds it thinks before answering. |
WORD_GAP | script.js | 0.055 | The seconds between one word of the answer and the next. |
HOLD | script.js | 2.6 | The seconds the answer stays before the next question. |
For an AI assistant’s chat, an app’s support, a product search that answers in words, a dashboard you can ask questions: the orb is the assistant itself and shows without words when it is thinking and when it is answering.
The same animation with adapted sizes: the orb goes down to 40 pixels, the text to 14, the conversation has a fixed height that holds a four line answer without moving anything. Tapping the orb swells it and answers again, like the click.
The orb stays still, without waves or turns: the states only change its glow. The question, Thinking and the answer fade in, without rising and without writing the words one at a time.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.6 KB; the libraries: GSAP 28 KB.
Tested on 25 October 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.