Skip to content
animorio
IT
All components

Thinking orb loader

Loading, WebGL, HoverWebGL, GSAPMediumCompressed weight: Demo 6.6 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a near black background there is a conversation with the Teyla assistant: on the right the question in a very dark grey bubble, below it on the left a small orb of light, the name Teyla and the status line. The orb is a drop of violet and blue liquid: its edge wobbles slowly with three slow waves, inside two bands of colour slide over each other with a brighter thread, the rim lights up like glass where the surface turns away and a white highlight sits top left; under it there is a soft halo. When the question arrives the orb tightens, the liquid churns more than three times faster, the halo widens and the word Thinking shimmers, with a light running through it. After almost two seconds the orb lets go: it grows a hair beyond its size and comes back with a small bounce, Thinking gives way to Thought for 2s in grey and the answer arrives word by word, each word rising four pixels and coming into focus. Then the Copy and Regenerate buttons appear, the orb settles, and after a moment the next question arrives. The highlight moves towards the pointer; over the orb it swells slightly, and clicking the orb or Regenerate answers again.

How it works

A drop in a fragment shader

The 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.

Liquid and glass

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.

States are numbers

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 liquid’s own time

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.

The answer word by word

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#8b7bffThe main colour of the orb.
ACCENT_2script.js#6fc3ffThe shade that flows inside the orb and lights its rim.
SPEEDscript.js1How much the liquid moves at rest.
INTENSITYscript.js1How much the orb wobbles and how strong the glow is.
THINK_SPEEDscript.js3.2How many times faster the liquid churns while thinking.
THINK_TIMEscript.js1.9The seconds it thinks before answering.
WORD_GAPscript.js0.055The seconds between one word of the answer and the next.
HOLDscript.js2.6The seconds the answer stays before the next question.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The shader’s time must be accumulated frame by frame (time += step × speed): multiplying the clock by the speed makes the liquid jump ahead every time the speed changes.
  • The canvas must be larger than the orb, here 1.9 times, or the halo is cut off square; and it must be measured again on resize, because the demo window changes size.
  • With premultipliedAlpha the colour coming out of the shader must already be multiplied by alpha: otherwise the halo becomes a grey ring on black.
  • The gradient shimmering inside Thinking needs background-clip: text and color: transparent together; with a CSS variable animated by GSAP it moves without rebuilding the gradient.

Libraries

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.

Testing

Tested on 25 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components