Skip to content
animorio
IT
All components

Summarize button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.8 KBGSAP 28 KBFreeDownload the zip

A meeting note in an AI app, on an almost black background, in the style of the light effects of AI apps: six grey lines and below them the Summarize button with a small sparkle. A single gesture, press: a blue and lilac light starts running round the button’s border, a soft band of light slides over the note line by line as if reading it and the words under it brighten as it passes; then the note folds down on a spring into a two line summary that writes itself letter by letter, the word count rolls from 79 to 19 and the button becomes Summarized · 2 lines, with a quiet Undo beside it.

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>
<!--
  "Summarize button" 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 Summarize button with a light that reads the text</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">
    <!-- a meeting note and its Summarize button: press it and a soft band of light reads the note line by line,
         then the note folds down into a two line summary that writes itself; Undo brings the note back -->
    <article class="note" data-note aria-label="Meeting note">
      <header class="note__top">
        <p class="note__title">
          <svg class="note__doc" viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 2.8h6.2l3.3 3.3v11.1H5.5Z"></path><path d="M11.6 2.8v3.4H15"></path><path d="M7.8 9.6h4.6M7.8 12.4h4.6"></path></svg>
          <span>Design sync</span>
          <span class="note__date">Oct 24</span>
        </p>
        <p class="note__count"><span class="roller" data-count></span> <span data-unit>words</span></p>
      </header>

      <div class="note__body" data-body>
        <p class="note__text" data-text></p>
        <p class="note__sum" data-sum aria-live="polite"></p>
        <span class="scan" data-scan aria-hidden="true"></span>
      </div>

      <footer class="note__foot">
        <div class="btnwrap" data-wrap>
          <span class="btn__halo" data-halo aria-hidden="true"><span class="btn__spin" data-spin-halo></span></span>
          <button class="btn" type="button" data-btn>
            <span class="btn__ring" data-ring aria-hidden="true"><span class="btn__spin" data-spin></span></span>
            <span class="btn__face" aria-hidden="true"><span class="btn__shine" data-shine></span></span>
            <span class="btn__in">
              <svg class="btn__spark" data-spark viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.4c.55 4 2.2 5.65 6.2 6.2-4 .55-5.65 2.2-6.2 6.2-.55-4-2.2-5.65-6.2-6.2 4-.55 5.65-2.2 6.2-6.2Z"></path><path d="M15.4 13.6c.2 1.4.75 1.95 2.15 2.15-1.4.2-1.95.75-2.15 2.15-.2-1.4-.75-1.95-2.15-2.15 1.4-.2 1.95-.75 2.15-2.15Z"></path></svg>
              <span class="btn__label" data-label></span>
            </span>
          </button>
        </div>
        <button class="undo" type="button" data-undo tabindex="-1">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M7.4 5.2 4.2 8.4l3.2 3.2"></path><path d="M4.6 8.4h7.1a4 4 0 0 1 0 8H9.2"></path></svg>
          <span>Undo</span>
        </button>
      </footer>
    </article>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
  </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 “Summarize button” 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

In the middle of an almost black background sits a note card, “Design sync, Oct 24”, with the “79 words” count at the top right and six grey lines: the minutes of a meeting about the new onboarding. Below it, the dark Summarize pill with a lilac sparkle. The drawn pointer arrives and presses: the pill squashes, a highlight passes under the finger, then it springs back. Right away a light starts running round the border, from clear to blue, white and lilac, with a blurred glow behind it; the sparkle spins and the label rolls to Reading…. Meanwhile a soft band of light slides over the note from left to right, one line after another, and every word under the band brightens towards white and goes back to grey as soon as the light has passed. Once the last line is read, the words lift away blurring from the end to the start, the card folds down on a spring to the height of two lines and the summary writes itself letter by letter, coming out of a blur; the count rolls from 79 to 19, the light on the border goes out, the sparkle settles with a small bounce and the button says how many lines it is, Summarized · 2 lines. Undo appears beside it. After a couple of seconds the pointer presses Undo: the summary wipes away, the card opens back up with the whole note and the count goes back to 79. Then it starts again.

How it works

One word, one span

The note is split into words, each in its own span, and the words are grouped into lines by reading their position: each line knows where it starts, where it ends and where the centre of each word sits. It is measured again on resize and before every reading.

The light that reads

A blurred band with a radial gradient slides line by line, each in a time proportional to its length. On every frame each word on that line takes a colour between grey and a white with a hint of blue, depending on its distance from the band, through a soft curve.

The spinning border

Inside the pill sits a square with a conic gradient that rotates, clipped by the pill’s corners, and over it the dark face one pixel in from the edge: what stays visible is a thread of light running round. A blurred copy behind makes the glow.

Folding and writing

The card has the height of the note; once the reading is over the words lift away, the height goes to the summary’s on an elastic spring and the summary’s letters come out of a blur with an 11 millisecond stagger. The counter has three columns of sliding digits, and the one left empty shrinks to zero.

Values to change

NameFileDefaultWhat it changes
READ_SPEEDscript.js1How fast the light reads the lines (2 twice as fast, 0.5 half).
LIGHTscript.js#a9b8ffThe colour of the light on the border and on the words.
GLOWscript.js1How strong the glow running round the border is (0 none).
SPRINGscript.js1How much the note bounces as it folds into the summary (0 none).
PRESS_SCALEscript.js0.955How much the button squashes when pressed.
DONE_HOLDscript.js2.6The seconds the summary stays before the autopilot presses Undo.

Try them in the Playground

When to use it

For the summarize button in a notes, email, documents or meetings app with AI: the reading light shows the work really happens on the text, and the summary takes the note’s place without opening a window.

On phones

The same animation: the card takes almost the whole width, the note wraps onto more lines and the light reads them all; the text and the button are measured on the screen height too.

With reduced motion

No sliding band, no squash and no spring, the sparkle does not spin: the words brighten all together and fade back to grey, the summary fades in and the border lights up and fades out; the drawn pointer stays hidden.

Pitfalls

  • The lines must be read from the words’ position after the font has loaded (document.fonts.ready): before that, with the fallback font, the words fall on different lines and the band reads empty space.
  • The words’ colour is computed in the script from the three channels, not with color-mix in CSS: that way the colour you see is the one the video records.
  • The button squashes with GSAP on the wrapper and the border spins inside the button: one element for the scale, one for the rotation, otherwise one transform wipes out the other.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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