Skip to content
animorio
IT
All components

AI reasoning panel

Accordions, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 6.8 KBGSAP 28 KBFreeDownload the zip

The answer of Fenwick, a made-up AI assistant, on white: the word Thinking shimmers and the time counts while the steps of the reasoning arrive one at a time, each with its icon drawing itself and then turning into a violet tick, along a thread that fills. When it is done the steps fold like an accordion into the line «Thought for 12s» and the answer streams in word by word; a click on the line opens the steps again. Minimal style.

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>
<!--
  "AI reasoning panel" 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>AI reasoning panel</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 of a made-up AI assistant, Fenwick: «Thinking» shimmers while the steps of the reasoning arrive and
         tick off one by one, then the steps fold into «Thought for 12s» and the answer streams in word by word -->
    <section class="chat" data-chat aria-label="Fenwick, the assistant">
      <p class="ask" data-ask>Which supplier gets our order to Lisbon fastest?</p>

      <div class="reply">
        <button class="think" type="button" data-head aria-expanded="true" aria-controls="steps" disabled>
          <svg class="think__mark" data-mark viewBox="0 0 16 16" aria-hidden="true">
            <path d="M8 1.2C8.7 5.5 10.5 7.3 14.8 8 10.5 8.7 8.7 10.5 8 14.8 7.3 10.5 5.5 8.7 1.2 8 5.5 7.3 7.3 5.5 8 1.2Z"/>
          </svg>
          <span class="roll" data-roll>
            <span class="roll__line shimmer" data-label-a>Thinking</span>
            <span class="roll__line" data-label-b>Thought for 12s</span>
          </span>
          <span class="think__time" data-time>0s</span>
          <svg class="think__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.2 8 9.8l3.5-3.6"/></svg>
        </button>

        <div class="steps" id="steps" data-steps>
          <span class="rail" data-track aria-hidden="true"></span><span class="rail rail--fill" data-rail aria-hidden="true"></span>
          <ol class="steps__list">
            <li class="step" data-step>
              <span class="node" data-node>
                <svg class="node__icon" viewBox="0 0 16 16" aria-hidden="true"><circle pathLength="1" cx="7" cy="7" r="4.2"/><path pathLength="1" d="M10.2 10.2l3.2 3.2"/></svg>
                <svg class="node__check" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M4.4 8.3l2.3 2.3 4.9-5.2"/></svg>
              </span>
              <span class="step__text" data-text>Searching shipping rates to Lisbon</span>
              <span class="step__meta" data-meta>3 suppliers</span>
            </li>
            <li class="step" data-step>
              <span class="node" data-node>
                <svg class="node__icon" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M4.4 2.4h5l2.6 2.6v8.6H4.4z"/><path pathLength="1" d="M6.5 8h3.6M6.5 10.6h2.6"/></svg>
                <svg class="node__check" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M4.4 8.3l2.3 2.3 4.9-5.2"/></svg>
              </span>
              <span class="step__text" data-text>Reading Harbor Freight terms</span>
              <span class="step__meta" data-meta>page 4</span>
            </li>
            <li class="step" data-step>
              <span class="node" data-node>
                <svg class="node__icon" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M3.6 13V7.4M8 13V3.4M12.4 13V9.4"/></svg>
                <svg class="node__check" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M4.4 8.3l2.3 2.3 4.9-5.2"/></svg>
              </span>
              <span class="step__text" data-text>Comparing delivery windows</span>
              <span class="step__meta" data-meta>2 to 6 days</span>
            </li>
            <li class="step" data-step>
              <span class="node" data-node>
                <svg class="node__icon" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M8 2.2l4.6 1.8v3.7c0 3-2 5.1-4.6 5.9-2.6-.8-4.6-2.9-4.6-5.9V4z"/></svg>
                <svg class="node__check" viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="M4.4 8.3l2.3 2.3 4.9-5.2"/></svg>
              </span>
              <span class="step__text" data-text>Checking customs for Portugal</span>
              <span class="step__meta" data-meta>EU, no duty</span>
            </li>
          </ol>
        </div>

        <p class="answer" data-answer><strong>Harbor Freight is fastest:</strong> two days to Lisbon by road, door to door. Norland takes four days and Castell six, and all three clear customs without duty inside the EU.</p>

        <div class="foot" data-foot>
          <span class="src"><span class="src__mark" aria-hidden="true">H</span>Harbor Freight terms</span>
          <span class="src"><span class="src__mark" aria-hidden="true">N</span>Norland rate card</span>
          <button class="again" type="button" data-again aria-label="Ask again">
            <svg class="again__icon" data-again-icon viewBox="0 0 16 16" aria-hidden="true"><path d="M12.6 6.2A5 5 0 1 0 13 9.4"/><path d="M13 3.2v3.2H9.8"/></svg>
            <span>Ask again</span>
          </button>
        </div>
      </div>
    </section>
    <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>

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.

34 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “AI reasoning panel” 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 white, top right, the question in a grey bubble: «Which supplier gets our order to Lisbon fastest?». Below, the assistant’s line: Fenwick’s violet four-point star, the word Thinking crossed by a sliding highlight and the seconds counting. Then the steps arrive, one at a time, each with a small circle and its icon drawing itself: Searching shipping rates to Lisbon (the lens), Reading Harbor Freight terms (the sheet), Comparing delivery windows (the bars), Checking customs for Portugal (the shield). The running step shimmers like Thinking, the detail on the right arrives halfway (3 suppliers, page 4, 2 to 6 days, EU, no duty); when it is done the icon goes, the circle fills with a violet veil with a small knock and the tick draws itself, the star makes a quarter turn and the violet thread joining the circles runs down to the step. After the last one, Thinking rolls away and «Thought for 12s» arrives, the time leaves, the chevron shows; the steps fold into the line and the answer comes in word by word out of a blur, with the first sentence in bold, then the two sources and «Ask again». A click on the line opens the steps again at their real height and the chevron turns; another closes them. «Ask again» spins the arrow once and the assistant thinks again. On its own, the tour opens and closes the steps and starts over.

How it works

One highlight for every word

Thinking and the running step share the same background: a grey, black, grey gradient 260% wide, clipped to the text with background-clip: text. Its position is a CSS variable, --sh, living on the chat container: GSAP takes it from 120% to -20% in a second and a half and repeats it, so the highlight crosses every shimmering word at the same moment.

The steps arrive on a timeline

Each step has its place on the timeline, one every STEP seconds: the row rises 7 pixels on a spring, the parts of the icon draw themselves (pathLength 1 and strokeDashoffset from 1 to 0), the detail arrives halfway; at 84% of the step the icon goes, the violet veil of the circle grows with back.out and the tick draws itself. The time is an object going from 0 to THOUGHT_FOR while the steps pass.

The thread and the star

The thread is a one-pixel line behind the circles, centred on their axis; inside it a second, violet line scales on Y, from 0 to 1 a third at a time, with its origin at the top. The header star sits on the same axis and at every tick makes a quarter turn with back.out(2.4) around its centre (transformOrigin 50% 50%).

An accordion with the real height

To close, GSAP takes the height of the steps to 0 with power3.inOut. To open, the real height is read by setting it to auto for an instant, it goes back to where it was and animates to the number read with expo.out, then auto again: so it holds even if the window changes. The chat keeps the height it has with everything open, and the page does not move.

The answer word by word

The text of the answer is split into words (the spaces stay text, so the lines break as before) and each word comes from 5 pixels lower and out of a 4 pixel blur, WORD_GAP seconds after the one before. The whole text goes into the aria-live region at the end, once.

Values to change

NameFileDefaultWhat it changes
STEPscript.js1.15The seconds each step of the reasoning takes, from its arrival to its tick.
THOUGHT_FORscript.js12The seconds the line says once the reasoning is over.
WORD_GAPscript.js0.03The seconds between one word of the answer and the next.
FOLDscript.js0.7The seconds the steps take to fold into the line.
SHIMMERscript.js1.5The seconds the highlight takes to cross Thinking.
LOOP_PAUSEscript.js2.2The seconds the answer rests before the tour opens the steps again.

Try them in the Playground

When to use it

In apps and sites with an AI assistant that reasons before answering: a research chatbot, an assistant for data or for customer service, a copilot inside a dashboard. It shows that the model is working and on what, and then gets out of the way.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the open chat fits whole in the phone box. Under 380 pixels the second source and the details on the right of the steps go. A tap on the line does what the click does.

With reduced motion

No movement, springs or blur: the highlight does not slide, rows, ticks and words fade in, the steps open and close at once and the star and the chevron do not turn.

Pitfalls

  • The highlight is a CSS variable: GSAP only animates it if it already has a value with the same unit (120% → -20%), so --sh has its starting value in the container’s CSS.
  • Icons and ticks draw themselves with pathLength="1" and strokeDashoffset: GSAP rounds the values it reads from the CSS to whole pixels and the line would pop in at once, which is why autoRound is off at the top.
  • The star and the Ask again arrow turn on the whole svg element, which on the page is an HTML element: transformOrigin 50% 50%, not svgOrigin, or they would turn around another point.
  • The tour stops only on real touches (isTrusted): if it is stopped while the chat is gone between one round and the next, the answer starts over instead of staying empty.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.8 KB; the libraries: GSAP 28 KB.

Testing

Tested on 24 November 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