Skip to content
animorio
IT
Back to the library

Highlighted review

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.0 KBGSAP 28 KBFreeDownload the zip

The customer stories of a made-up work planning app, Pathline, in the style of today’s software landing pages: a big quote coming in word by word, and as you read it a soft highlighter slides under the key words, which gain weight. Below, the customer with their company mark, which lights up once the quote is read; then the next review. With the pointer over it the pace stops.

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>
<!--
  "Highlighted review" 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 customer review that highlights as you read</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the customer stories of a made-up planning tool, Pathline: a big quote whose key words light up with a soft
         highlighter as you read it, the client underneath, and three stories that change by themselves -->
    <section class="review" data-review aria-roledescription="carousel" aria-label="Customer stories">
      <header class="review__top">
        <span class="review__label">Customer stories</span>
        <div class="review__nav">
          <button class="arrow" type="button" data-prev aria-label="Previous story">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12.5 4.5 7 10l5.5 5.5"/></svg>
          </button>
          <button class="arrow" type="button" data-next aria-label="Next story">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M7.5 4.5 13 10l-5.5 5.5"/></svg>
          </button>
        </div>
      </header>

      <div class="review__marks">
        <svg class="quote" viewBox="0 0 48 36" aria-hidden="true" data-quote>
          <path class="q-dot" d="M11 32.5a6.5 6.5 0 1 1 0-13a6.5 6.5 0 1 1 0 13z"/>
          <path class="q-tail" d="M4.6 25c-.3-8.5 3.6-15.4 11.6-20.4"/>
          <path class="q-dot" d="M33 32.5a6.5 6.5 0 1 1 0-13a6.5 6.5 0 1 1 0 13z"/>
          <path class="q-tail" d="M26.6 25c-.3-8.5 3.6-15.4 11.6-20.4"/>
        </svg>
        <div class="stars" data-stars aria-label="Rated 5 out of 5">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path class="star__line" d="M10 2.2l2.3 5 5.4.6-4 3.7 1.1 5.3L10 14.1l-4.8 2.7 1.1-5.3-4-3.7 5.4-.6z"/><path class="star__fill" d="M10 2.2l2.3 5 5.4.6-4 3.7 1.1 5.3L10 14.1l-4.8 2.7 1.1-5.3-4-3.7 5.4-.6z"/></svg>
        </div>
      </div>

      <blockquote class="review__text" data-text aria-live="polite"></blockquote>

      <footer class="review__who" data-who>
        <span class="avatar" data-avatar></span>
        <span class="who">
          <span class="who__name" data-name></span>
          <span class="who__role" data-role></span>
        </span>
        <span class="logo" data-logo aria-hidden="true"></span>
      </footer>

      <div class="review__bars" aria-hidden="true">
        <span class="bar"><i data-bar></i></span>
        <span class="bar"><i data-bar></i></span>
        <span class="bar"><i data-bar></i></span>
      </div>
    </section>
  </main>

  <svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2v15.6l4.3-4.1 2.9 6.3 2.6-1.2-2.9-6.2h6z"/></svg>

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

15 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 “Highlighted review” 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, the customer stories section of Pathline, a made-up work planning app: at the top Customer stories and the two arrows, below the quotation marks drawing themselves in a violet line and filling with a light lilac, and next to them five stars lighting up one after another with a little spin. The quote comes in word by word, rising out of a slight blur. Then you read it: at the pace of a calm reading, when a key word arrives a soft highlighter, from lilac to light blue, slides under it from the left, and the word gains weight and lifts by a pixel; the space between two words of the same phrase stays highlighted, so the mark never breaks. Below, after a thin line, the customer: the round avatar with initials on a gradient, the name, the role and the company, and on the right the company’s mark, dim until the review has been read, then lit with a small bounce. At the bottom three thin bars fill with the time of each review. After a pause the words rise away one after another and the next review arrives; the arrows go forward and back, and going back the words come in from above. With the pointer over it the pace slows down to a stop, and starts again on leaving. A drawn pointer, on the second review, rests on the text and then presses the arrow.

How it works

Key words in brackets

Each review is a sentence with its key words in square brackets. The script cuts it into words, one per span; inside a key phrase the space stays attached to the word before, so the highlighter covers the space too and the mark runs from one end of the phrase to the other without gaps.

Weight without moving the line

A word going from weight 400 to 650 gets wider and would push the whole line. Before starting, each key word is measured at both weights and widened with a little letter spacing, just enough to be as wide as it will be in bold; then, as the weight rises, the spacing goes back to zero: the word gains weight without moving anything around it.

The reading pace

One word takes 60 divided by READ_WPM seconds. The timeline places each key word’s highlighter at its point in the reading: scaleX from 0 to 1 starting from the left in MARKER seconds, the weight and one pixel up and down. The bars at the bottom fill in the same time, reading plus waiting.

Stopping under the pointer

The pointer over the section does not pause it at once: a tween takes the timeline’s speed to zero in three tenths of a second with timeScale, and on leaving brings it back to one. So even a highlighter halfway through a word slows down and stops.

Values to change

NameFileDefaultWhat it changes
READ_WPMscript.js250The words per minute of the reading pace: the highlighter moves at this rate.
HOLDscript.js1.8The seconds the read review stays still before the next one.
SWAPscript.js0.9The seconds of the change between reviews.
KEY_WEIGHTscript.js650The weight the highlighted words take on.
MARKERscript.js0.34The seconds the highlighter takes to slide under a word.
PILOTscript.jstrueThe drawn pointer that rests on the text and presses the arrow.

Try them in the Playground

When to use it

For the reviews or customer stories section of a landing page, a software product or a service: readers see at once the words that matter, and the customer’s mark lighting up works as a signature.

On phones

The same animation with adapted sizes: the quote is sized on the width and the height, the role is shortened and the mark keeps only its symbol; a tap on the arrows changes review.

With reduced motion

No rising words, no blur and no sliding highlighter: the review fades in already highlighted with the mark lit, and changes with a fade.

Pitfalls

  • Gaining weight a word gets wider: without the compensating letter spacing, measured at both weights, the whole line shook at every key word (and the measure is redone for every story, once the font has loaded).
  • The space between two key words outside the spans left a hole in the highlighter: it goes inside the word before, with white-space pre.
  • The hover pause slows the timeline with timeScale instead of pausing it: coming back to 1 from an exact zero is a jump, so the minimum speed is one ten-thousandth.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 26 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