Skip to content
animorio
IT
Back to the library

Shimmering AI loader

TextGSAP, CSS onlyMediumCompressed weight: Demo 7.2 KBGSAP 28 KBFreeDownload the zip

The status line of an AI research assistant, on a white card: while it searches it changes sentence, the letters rise one at a time and a light runs across them from left to right, darkening them and making them slightly bolder with Mona Sans’s weight axis. The sources arrive, then the answer word by word, and the line closes on «Done in 4.2s» with a check.

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>
<!--
  "Shimmering AI 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 shimmering text loader while the AI searches</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">
    <!-- the answer card of a research assistant: while it works, the status line changes sentence and a light runs
         over its letters; the sources arrive one by one, then the answer, and the line closes on the time it took -->
    <article class="card" data-card aria-label="Lumet research assistant">
      <header class="ask">
        <svg class="ask__icon" viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.6" cy="8.6" r="5.2"></circle><path d="m12.5 12.5 4.2 4.2"></path></svg>
        <p class="ask__text" data-question></p>
      </header>

      <div class="status" data-status>
        <span class="status__mark" aria-hidden="true">
          <svg class="status__ring" data-ring viewBox="0 0 20 20"><circle class="status__track" cx="10" cy="10" r="7"></circle><path class="status__arc" d="M10 3a7 7 0 0 1 7 7"></path></svg>
          <svg class="status__check" data-check viewBox="0 0 20 20"><circle class="status__disc" cx="10" cy="10" r="8"></circle><path class="status__tick" data-tick d="M6.4 10.3 8.9 12.7 13.8 7.6"></path></svg>
        </span>
        <p class="status__text" data-line aria-live="polite"></p>
        <span class="status__time" data-time>0.0s</span>
        <button class="status__stop" type="button" data-stop aria-label="Stop searching"><svg viewBox="0 0 20 20" aria-hidden="true"><rect x="6.5" y="6.5" width="7" height="7" rx="1.6"></rect></svg></button>
      </div>

      <ul class="sources" data-sources aria-label="Sources"></ul>

      <div class="answer" data-answer></div>

      <footer class="foot" data-foot>
        <button class="foot__btn" type="button" data-copy aria-label="Copy answer">
          <svg class="foot__icon foot__icon--copy" 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.2A1.7 1.7 0 0 0 4.5 6.2V13"></path></svg>
          <svg class="foot__icon foot__icon--done" viewBox="0 0 20 20" aria-hidden="true"><path d="M5.6 10.4 8.6 13.3 14.6 7"></path></svg>
          <span class="foot__label" data-copy-label>Copy</span>
        </button>
        <span class="foot__note">Lumet can be wrong. Check the sources.</span>
      </footer>
    </article>
  </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 “Shimmering AI 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 very light grey background sits the white card of a research assistant, Lumet, with wide corners and a soft shadow. At the top the question in grey, with a magnifier: which standing desk under 600 dollars is the quietest. Below, in a grey pill, the status line: a thin spinning arc, the sentence, the elapsed time in tabular figures and a square stop button. The sentence changes four times, Searching 14 sources, Reading the docs, Comparing prices, Writing the answer: the old letters rise and vanish one after another, the new ones arrive from below on a short spring. Meanwhile a light runs across the letters from left to right: where it passes they turn almost black, at its centre they pick up a touch of violet and get a little bolder. The sources come in staggered, in grey pills with their initial in a small square, then the answer appears word by word, with the desk’s name and the figures in bold. At 4.2 seconds the line closes on Done in 4.2s, the light goes out, the arc becomes a check that draws itself and the time and the button slide away. A fake pointer goes to Copy and presses it: the button dips, the icon becomes a check and the label says Copied. Then the card fades and it starts again.

How it works

One row per sentence

Each sentence of the status line is a span with one letter per span, and all the sentences sit on top of each other in the same place. So the change is only an exit and an entrance: the old letters rise 0.6 em while fading, nine milliseconds apart, the new ones arrive from 0.75 em below with back.out(1.5), sixteen milliseconds apart.

The light worked out letter by letter

The centre of each letter is measured once (and again on resize). Every frame the light moves on a step, and each letter takes a colour between grey and near black from a gaussian of its distance to the light, SHIMMER_WIDTH pixels wide; above 55% a touch of the accent colour is added. The same number raises the weight with font-variation-settings, up to WEIGHT_BOOST units more.

One timeline that repeats

The whole loop is one GSAP timeline with repeat -1: at the start it puts everything back with set, then the sentences at equal steps, the sources staggered by 0.22 seconds, the answer word by word with a little blur clearing, and the time counting from 0 to DONE_TIME in tabular figures.

Done, and copied

At the end the light goes out as shine goes to 0, the arc leaves and the check comes in with back.out(2.2) while its mark draws with stroke-dashoffset. The fake pointer goes to Copy with power3.inOut and presses it: the button dips to 95.5% and springs back, the icon becomes a check. Really touching Stop or Copy makes the fake pointer go away for good.

Values to change

NameFileDefaultWhat it changes
QUESTIONscript.js'Which standing desk under $600 is the quietest?'The question at the top of the card.
STEPSscript.js'Searching 14 sources|Reading the docs|Comparing prices|Writing the answer'The sentences of the status line, separated by |.
DONE_TIMEscript.js4.2The seconds the line says at the end.
SHIMMER_SPEEDscript.js1How fast the light runs over the letters.
SHIMMER_WIDTHscript.js46How wide the light is, in pixels.
WEIGHT_BOOSTscript.js170How much bolder the letters get under the light.
ACCENTscript.js'#4f46e5'The colour at the centre of the light, of the arc and of the focus ring.
LOOP_PAUSEscript.js1.6The seconds of pause once the answer is done.

Try them in the Playground

When to use it

For the wait in an app with artificial intelligence (a search, an assistant, a summary), but also for any loading that does several things one after another (an export, a check, a payment): the line says what is happening and the light shows it has not frozen.

On phones

The same animation with adapted sizes: the card takes the screen width minus the margins, the type gets a little smaller and the note at the bottom hides below 380 pixels. Touching the status line makes the light run faster, like hovering with a mouse.

With reduced motion

No moving light and no rising letters: the sentences take turns with a fade, the arc stays still, the answer appears without moving and there is no fake pointer.

Pitfalls

  • The light does not use background-clip: text on the whole line, because letters rising with a transform drop out of the clip in Chrome and Safari: the colour is worked out letter by letter, with the same result.
  • The letter positions must be measured after document.fonts.ready and again on resize: measured with the fallback font, the light would pass in the wrong place.
  • A function as a tween value is read only once: to remove the fake pointer after a real touch the timeline is rebuilt, starting again from the same point.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.2 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 animations