Skip to content
animorio
IT
Back to the library

AI review summary

Text, HoverCanvas, GSAPMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The AI summary of the reviews of a made-up pair of headphones, Norrow One, in a dark panel with three review cards and stars drawn in SVG. On top four topics with their counts, Battery, Setup, Noise and Support: hovering or picking one, the sentences of the reviews that talk about it light up with a veil of liquid metal laid behind the words in reading order that keeps flowing, the other lines dim a little, a pill with a metal rim slides under the topic and the AI writes its one-line summary, with the share of happy buyers rolling up.

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 review summary" 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 AI review summary with the topic sentences lighting up</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" data-stage>
    <!-- the review summary of a made-up pair of noise-cancelling headphones, Norrow One, read by an AI.
         Four topics on top with their counts: hovering or picking one, the sentences of the three reviews that talk
         about it light up with a soft veil of liquid metal that flows behind the words, the other lines dim a little
         and the AI writes its one-line summary of the topic -->
    <div class="fit" data-fit>
      <article class="panel" data-panel>
        <span class="panel__sheen" aria-hidden="true"></span>

        <header class="head">
          <span class="head__thumb" aria-hidden="true">
            <svg viewBox="0 0 24 24"><path d="M4.5 14.5v-2.2a7.5 7.5 0 0 1 15 0v2.2"/><path d="M4.5 14.2c0-.9.7-1.6 1.6-1.6h.6c.6 0 1 .4 1 1v4.6c0 .6-.4 1-1 1h-.6c-.9 0-1.6-.7-1.6-1.6Z"/><path d="M19.5 14.2c0-.9-.7-1.6-1.6-1.6h-.6c-.6 0-1 .4-1 1v4.6c0 .6.4 1 1 1h.6c.9 0 1.6-.7 1.6-1.6Z"/></svg>
          </span>
          <span class="head__title">
            <span class="head__name">Norrow One</span>
            <span class="head__meta">Noise-cancelling headphones</span>
          </span>
          <span class="head__score">
            <span class="head__rating" data-rating>4.4</span>
            <span class="head__right">
              <span class="stars stars--big" data-stars="4.4" aria-label="4.4 out of 5"></span>
              <span class="head__count"><span data-total>2,318</span> reviews</span>
            </span>
          </span>
        </header>

        <div class="topics" role="group" aria-label="Topics in the reviews" data-topics>
          <span class="topics__pill" data-pill aria-hidden="true"><span class="topics__metal"></span></span>
          <button class="topic" type="button" data-topic="battery" aria-pressed="false"><span class="topic__name">Battery</span><span class="topic__count" data-count="642">642</span></button>
          <button class="topic" type="button" data-topic="setup" aria-pressed="false"><span class="topic__name">Setup</span><span class="topic__count" data-count="318">318</span></button>
          <button class="topic" type="button" data-topic="noise" aria-pressed="false"><span class="topic__name">Noise</span><span class="topic__count" data-count="871">871</span></button>
          <button class="topic" type="button" data-topic="support" aria-pressed="false"><span class="topic__name">Support</span><span class="topic__count" data-count="154">154</span></button>
        </div>

        <div class="sum" data-sum>
          <svg class="sum__spark" viewBox="0 0 16 16" aria-hidden="true" data-spark><path d="M8 1.4c.55 3.4 2 5 5.9 6.6-3.9 1.6-5.35 3.2-5.9 6.6-.55-3.4-2-5-5.9-6.6C6 6.4 7.45 4.8 8 1.4Z"/></svg>
          <span class="sum__body">
            <span class="sum__meta" data-sum-meta>
              <span class="sum__label" data-sum-label>Review summary</span>
              <span class="sum__mood" data-mood><span class="sum__bar"><span class="sum__fill" data-fill></span></span><span><span data-pct>0</span>% positive</span></span>
            </span>
            <span class="sum__text" data-sum-text></span>
          </span>
        </div>

        <div class="reviews" data-reviews>
          <article class="review" data-review>
            <canvas class="review__light" aria-hidden="true"></canvas>
            <header class="review__head">
              <span class="review__avatar" aria-hidden="true">MR</span>
              <span class="review__who">Maya R.</span>
              <span class="stars" data-stars="5" aria-label="5 out of 5"></span>
              <span class="review__date">Oct 28</span>
            </header>
            <p class="review__text"><span class="s" data-t="noise">On my commute the train just fades out.</span> <span class="s" data-t="battery">I charge them once a week and still have hours left.</span> <span class="s" data-t="setup">They paired before I finished unboxing.</span></p>
          </article>
          <article class="review" data-review>
            <canvas class="review__light" aria-hidden="true"></canvas>
            <header class="review__head">
              <span class="review__avatar" aria-hidden="true">TE</span>
              <span class="review__who">Tom E.</span>
              <span class="stars" data-stars="4" aria-label="4 out of 5"></span>
              <span class="review__date">Nov 2</span>
            </header>
            <p class="review__text"><span class="s" data-t="battery">Lasted a 14-hour flight with cancelling on the whole way.</span> <span class="s" data-t="noise">On windy days you still hear a soft rumble.</span> <span class="s" data-t="setup">The app wanted two updates in the first hour.</span></p>
          </article>
          <article class="review" data-review>
            <canvas class="review__light" aria-hidden="true"></canvas>
            <header class="review__head">
              <span class="review__avatar" aria-hidden="true">PK</span>
              <span class="review__who">Priya K.</span>
              <span class="stars" data-stars="4" aria-label="4 out of 5"></span>
              <span class="review__date">Nov 6</span>
            </header>
            <p class="review__text"><span class="s">The left cup crackled after a month.</span> <span class="s" data-t="support">Support answered that evening and a new pair came in three days.</span> <span class="s" data-t="noise">Office chatter is basically gone.</span></p>
          </article>
        </div>
      </article>

      <svg class="hand" viewBox="0 0 24 24" aria-hidden="true" data-hand><path d="M5.2 3.2v15.2l4-3.7 2.6 5.6 2.6-1.2-2.6-5.5 5.4-.4Z"/></svg>
    </div>
    <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.

54 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 “AI review summary” 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 page a dark panel rises, with round corners and a top edge catching the light. At its head the headphones drawn in a line, the name Norrow One with ‘Noise-cancelling headphones’ below, and on the right the rating 4.4 rolling up from zero, five stars filling one after the other (the last one halfway) and ‘2,318 reviews’. Below, in a thin bar, four topics with their counts rolling: Battery 642, Setup 318, Noise 871, Support 154. Then the summary line with a small lilac four-pointed star, and three review cards with the initials, the name, the stars and the date. The pointer goes to Noise: a pill with a liquid metal rim slides under the topic, in the three reviews the sentences about noise light up one after the other, a silver, lilac and ice veil is laid behind the words in reading order, line after line, with a brighter front running ahead, and then keeps flowing slowly like molten metal; the other sentences dim a little. Next to the small star ‘Noise’ and ‘86% positive’ appear with a short bar filling on a spring, and the AI writes its summary letter by letter. The pointer presses, the pill stays; then it moves on to Battery, Setup and Support, and the pill stretches and settles at every jump. Where a card does not talk about the topic, its head dims too. At the end a click on the head lets the topic go and everything goes back as it was.

How it works

Each sentence is a span with its topic

In the reviews every sentence is a span with data-t (battery, setup, noise, support, or none). Picking a topic, the right sentences get the is-on class and the container is-lit: the others drop to the DIM opacity with a CSS transition, so the text stays real text, selectable and read by screen readers.

The lines of a sentence with getClientRects

A span that wraps returns one rectangle per line from getClientRects. They are brought into the card’s coordinates (divided by the panel’s scale, which shrinks on short pages), the ones on the same line are merged and widened by 3 px a side. It all gets measured again on resize and when the typeface arrives.

The veil in reading order

Each sentence has two numbers, p (how much veil is laid) and a (how lit it is), animated by GSAP. The laid veil is p times the length of all its lines put in a row: it fills the first line, then the second, like a hand reading. The duration is the length divided by SWEEP, each card starts 0.09 s after the one before.

The liquid metal on a canvas

Under the text of each card there is a 2D canvas. Every frame a horizontal gradient of twelve stops mixes silver, lilac and ice with two sines that move in time and bend each other, so the bright bands move like molten metal. On top a vertical gradient (lighter at the top, cooler at the bottom), a thread of light on the top edge, a slightly wider halo and, while it is being laid, a brighter radial front.

The pill, the summary and the pointer

The pill under the topic moves with back.out and squashes by a tenth on an elastic spring; its metal rim is a gradient seen through a 1 px ring (mask composite) sliding with a CSS variable. The summary types itself with a tween on the number of letters, the share of happy buyers rolls and the short bar fills with elastic.out. Left alone, a fake pointer walks through the four topics; a real gesture stops it and it starts again after seven seconds.

Values to change

NameFileDefaultWhat it changes
SWEEPscript.js620How fast the veil is laid behind the words, in pixels per second.
TYPE_SPEEDscript.js52Letters per second of the summary.
DIMscript.js0.4How bright the lines that do not talk about the topic stay (1 = no dimming).
GLOWscript.js1How strong the liquid metal light is.
FLOWscript.js1How fast the metal keeps flowing behind the words.
HOLDscript.js3.4Seconds on each topic when the demo plays by itself.
SPEEDscript.js12 = everything twice as fast, 0.5 = half.
LOOPscript.jstrueWalks through the topics again and again.

Try them in the Playground

When to use it

For a product page in an online shop, the page of a software, a hotel or a piece of gear with many reviews: when visitors should find at once what others say about the topic they care about, and the AI summary should be checkable against the real sentences.

On phones

The same animation with adapted sizes: sizes follow the height too, the topics put the count under the name and, if the panel is still taller than the page, the script shrinks it just enough and measures the lines of the sentences again. With a finger a tap picks a topic and a second tap lets it go.

With reduced motion

No movement: the panel fades in, the veil is already laid and fades in, the summary appears whole, the pill changes topic with a fade and there is no fake pointer, the topics change by themselves.

Pitfalls

  • A highlighter made with a background on a wrapping span fills every line at once or breaks at the corners: with getClientRects and a canvas the veil follows the reading order and the corners stay round on every line.
  • The panel is shrunk with a transform: getBoundingClientRect returns sizes already scaled, so the rectangles must be divided by the scale, or the veil stays smaller than the words.
  • Changing the weight of the lit sentences moves the line breaks and the rectangles no longer match: the sentences change only colour and opacity.
  • The summary line keeps a fixed room for two lines: without it the panel grows and the cards jump at every topic.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 11 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 animations