Skip to content
animorio
IT
Back to the library

AI contract review

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

The review panel of an app that reads contracts with artificial intelligence: a clause is read line by line, then a highlighter of light runs word after word along the three risky phrases with a glowing tip. Hovering one opens a frosted note with what it means and a safer wording: Apply rewrites the phrase in place, the old words lift and fade, the new ones settle with a pixel of bounce and the risk rolls down.

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 contract 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 AI contract review with the risky clauses marked in light</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 review panel of an AI contract tool: the clause is read line by line, the risky phrases are marked by a
         marker of light that runs along the words, and hovering one opens a note with a safer wording that rewrites
         the phrase in place -->
    <article class="doc" data-doc>
      <span class="doc__sheen" aria-hidden="true"></span>
      <header class="doc__head">
        <span class="doc__icon" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M5.5 2.75h6.2l3.55 3.55v10.2c0 .41-.34.75-.75.75h-9a.75.75 0 0 1-.75-.75V3.5c0-.41.34-.75.75-.75Z"/><path d="M11.5 2.9v3.6h3.6"/><path d="M7.5 10.5h5M7.5 13.25h3.4"/></svg>
        </span>
        <span class="doc__title">
          <span class="doc__name">Services Agreement</span>
          <span class="doc__meta">Northfield Labs, Term and fees</span>
        </span>
        <span class="doc__status" data-status>
          <svg class="doc__spark" viewBox="0 0 16 16" aria-hidden="true" data-spark><path d="M8 1.6c.5 3.3 1.9 4.9 5.6 6.4-3.7 1.5-5.1 3.1-5.6 6.4-.5-3.3-1.9-4.9-5.6-6.4C6.1 6.5 7.5 4.9 8 1.6Z"/></svg>
          <svg class="doc__ok" viewBox="0 0 16 16" aria-hidden="true"><path data-ok pathLength="1" d="M3.6 8.4l2.9 2.9 5.9-6.4"/></svg>
          <span class="doc__status-words" data-status-words>Reading</span>
        </span>
      </header>

      <div class="doc__body" data-body>
        <span class="doc__scan" data-scan aria-hidden="true"></span>
        <span class="doc__head-light" data-light aria-hidden="true"></span>
        <p class="doc__text" data-text></p>
      </div>

      <footer class="doc__foot">
        <span class="doc__label">Risk</span>
        <span class="doc__track" aria-hidden="true"><span class="doc__fill" data-fill></span></span>
        <span class="doc__score" data-score>0</span>
        <span class="doc__brand">Covenly Review</span>
      </footer>

      <div class="tip" data-tip role="dialog" aria-hidden="true">
        <span class="tip__caret" data-caret aria-hidden="true"></span>
        <span class="tip__label" data-tip-label>Auto-renewal</span>
        <span class="tip__note" data-tip-note></span>
        <span class="tip__rule" aria-hidden="true"></span>
        <span class="tip__row">
          <span class="tip__fix"><span class="tip__fix-label">Suggest</span><span class="tip__fix-words" data-tip-fix></span></span>
          <button class="tip__btn" type="button" data-apply><span class="tip__btn-face" data-apply-face>Apply</span></button>
        </span>
      </div>
    </article>
    <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.

26 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 contract 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 a paper coloured page a white card with a soft shadow rises slowly: at the top the sheet icon, ‘Services Agreement’, under it ‘Northfield Labs, Term and fees’, and on the right a pill with a small yellow star saying ‘Reading’ with a shimmer running across it. The clause is still pale like a draft; a thin line of yellow light moves down the lines and the words turn black one after the other, as if the AI were reading them. Then a highlighter of light runs over ‘renews automatically for 24-month terms’: a glowing tip travels right word after word, across the line break too, leaving yellow behind it that shines for a moment and settles; the same on ‘at any time without notice’ and on ‘unlimited’. With each marked phrase the pill counts ‘1 to review’, ‘2’, ‘3’ and the risk bar at the bottom stretches on a spring up to 78. Then the first phrase lights up stronger, the rest of the text fades and a frosted glass note opens with its little pointer: ‘Auto-renewal’, what it means, and below ‘Suggest: renews once, for 12 months’ with the black Apply button. The button gives under the finger and comes back on an elastic; the old words lift away blurring, the paragraph settles to its new height, the new ones drop into place with a pixel of bounce, get a thin yellow underline and a checkmark draws itself next to them. The risk rolls down. After the third the pill says ‘All clear’ with a check, and the loop starts again. With the pointer the note of the phrase under it opens and Apply really rewrites it.

How it works

Words with their space attached

The clause is a list of pieces: plain text and risky phrases with their safe wording. Each word becomes a span that keeps the space after it, so the highlighter runs without gaps even when the phrase wraps.

The yellow is a growing background

Each marked word has a solid gradient background calc(var(--m) * 100%) wide. GSAP takes --m from 0 to 1 word after word, with a duration equal to the width divided by the speed: the stroke keeps the same pace over short and long words.

The tip of light

A soft oval with a golden thread in the middle is placed at the start of each word (measured with getBoundingClientRect against the body) and runs to its right edge together with the background; at the end of the phrase it widens and fades, and the yellow shines a little stronger before settling.

A note that places itself

The note opens above the first word of the phrase, inside the card; if there is no room above it goes below and the pointer flips. It opens with back.out and its parts arrive 35 ms apart; on resize it moves back into place.

Rewriting without jumps

Before swapping the phrase the paragraph's height is measured, then the words are swapped and the height is tweened from the old to the new. The new words come from 7 px below with a little blur and back.out, the underline is a second gradient 1.5 px tall, the check a path with pathLength 1.

Values to change

NameFileDefaultWhat it changes
READ_TIMEscript.js1.4The seconds the AI takes to read the clause.
MARK_SPEEDscript.js420How fast the highlighter of light runs, in pixels per second.
HOLDscript.js1.7The seconds the note stays open before the loop presses Apply.
OVERSHOOTscript.js1.6How far the new words pass their place before settling.
SPEEDscript.js12 = the loop on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the review.

Try them in the Playground

When to use it

For the page of an AI app that reads contracts, documents or texts (legal, HR, writing), to show at a glance what it finds and what it suggests; or for the ‘how it works’ section of a SaaS.

On phones

The same animation with adapted sizes: the card takes the box's width, the text and margins are sized on the height too, the note stays inside the card, and a finger taps the phrase to open it and Apply to rewrite it.

With reduced motion

No scan line and no tip of light: the words darken and the yellow fades in, the note opens without moving and the new phrase fades in.

Pitfalls

  • With the space outside the spans the highlighter leaves a white gap between words: the space belongs inside the previous word.
  • When the phrase changes the paragraph's height jumps and the card with it: measure before and after and tween the height, then clear it with clearProps so it stays free on resize.
  • A note with a too transparent background shows the blurred lines below and looks dirty: the glass here is at 95%.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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