Skip to content
animorio
IT
Back to the library

Similarity check

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

The plagiarism check of a school writing app: a blue line comes down the page and, where it passes, the passages found in other sources light up in their source’s colour. Below, the three sources wake up with their share, and at the top the ring climbs to 18 per cent. Tapping a source leaves only its passages lit.

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>
<!--
  "Similarity check" 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>Similarity check</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 similarity check of a school writing app: a line passes over the page, the passages
         found elsewhere light up in the colour of their source and the percentage climbs in the ring -->
    <section class="sc" data-sc data-focus="" aria-label="Similarity check">
      <header class="sc__head">
        <span class="sc__title"><strong>Why the tides rise</strong><span class="sc__state"><span data-outstate>Checking against 3 sources</span></span></span>
        <span class="sc__ring"><svg viewBox="0 0 44 44" aria-hidden="true"><circle class="sc__rail" cx="22" cy="22" r="18"></circle><circle class="sc__arc" cx="22" cy="22" r="18" pathLength="100" data-arc></circle></svg><b><span data-outtotal>0</span>%</b></span>
      </header>
      <div class="sc__page" data-page>
        <p class="sc__text">The tides are driven mostly by the Moon. As the Earth turns, <mark data-mark="0">the side facing the Moon is pulled slightly towards it</mark>, and the oceans bulge. A second bulge forms on the far side, which is why <mark data-mark="1">most coasts see two high tides a day</mark>. The Sun adds its own pull, and <mark data-mark="2">sailors have planned around these spring tides for centuries</mark>.</p>
        <i class="sc__scan" data-scan aria-hidden="true"></i>
      </div>
      <ul class="sc__sources" data-sources>
        <li><button type="button" data-src="0" style="--c:#f3b33d"><i></i><span>Open Almanac of the Sea</span><b><span data-outpct>0</span>%</b></button></li>
        <li><button type="button" data-src="1" style="--c:#5aa9e6"><i></i><span>Tidewater Journal, 2019</span><b><span data-outpct>0</span>%</b></button></li>
        <li><button type="button" data-src="2" style="--c:#e8798d"><i></i><span>Student paper, last term</span><b><span data-outpct>0</span>%</b></button></li>
      </ul>
      <button class="sc__again" type="button" data-again><span class="sc__spin"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M13 8a5 5 0 1 1-1.600-3.700M13 2.500v2.800h-2.800"></path></svg></span>Check again</button>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

37 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 “Similarity check” 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 warm white, a light card: at the top the essay’s title, “Why the tides rise”, the line “Checking against 3 sources” and an empty ring with “0%”; in the middle the page with a paragraph about tides; below, three sources still dimmed, each with its colour, its name and “0%”, and “Check again”. On opening, a blue line with a pale trail comes down the page. When it passes the start of a passage found elsewhere, a highlighter in that source’s colour spreads over its words from left to right, across two lines too; the source below wakes up with a small nudge and its percentage counts (7, 5 and 6), while the ring at the top moves on and the number in its centre climbs to 18. Once the line has gone the text rolls into “3 passages match other sources” and the ring gives a small bounce. Hovering a source, or tapping it, fades the other passages and leaves only its own lit. “Check again” spins the arrow and runs the check from the start.

How it works

The line finds the passages

A number takes the line from the top to the bottom of the page. On every frame the script looks at which passages start higher than the line: those become found, once only.

The spreading highlighter

Every passage is a mark with a zero-wide gradient background: GSAP takes its width to one hundred per cent through a CSS variable. When the passage wraps, each line fills on its own.

The ring is the sum

Every source has its share. The ring shows the sum of the shares found so far, as the dash of a circle one hundred long, and the number in the centre is the same value rounded.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#2f6df6The colour of the scan line, the ring and Check again.
SCANscript.js2.6How many seconds the line takes to cross the whole page.
DRAWscript.js0.6How many seconds a highlight takes to spread.

Try them in the Playground

When to use it

On the site or in the app of a school, writing or proofreading tool, to show the originality check; the same passing line with its highlights carries a contract review, the search for personal data in a document or the weak spots an AI found in a text.

On phones

The card is at most 356 pixels wide and narrows with the screen; the page’s text and the height of the source rows are sized on height too, so everything fits a short window. The text wraps by itself and the line finds the passages wherever they end up. Sources are tapped: hover is an extra.

With reduced motion

No line coming down: the three passages are already highlighted, the sources lit with their percentages and the ring still at the total. “Check again” puts everything back as it is, with no motion. The demo’s pointer does not start.

Pitfalls

  • The passages are real mark elements in the paragraph: the text stays readable and selectable, and the result is read out in full in an aria-live region.
  • A source is not told by colour alone: it has a name and a percentage, and tapping it leaves only its passages lit.
  • At zero per cent the ring’s arc has to be hidden: with round caps a dot would remain.
  • Text, sources and percentages are invented: in a real product the server does the comparison, and a similarity is not in itself plagiarism.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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