Skip to content
animorio
IT
Back to the library

Email spam score

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.3 KBGSAP 28 KBFreeDownload the zip

The spam score of an email in a newsletter tool: a half dial in three bands with its needle, the mark out of ten and the subject line with its risky words flagged. Ticking a fix rewrites the subject, the needle climbs on a spring and swings before it stops, and the verdict goes from “Likely to land in spam” to “Good to send”.

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>
<!--
  "Email spam score" 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>Email spam score</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 spam score of an email in a newsletter tool: every fix you apply rewrites the subject
         line and the needle swings up the half dial on a spring -->
    <section class="sp" data-sp data-zone="bad" aria-label="Spam score">
      <header class="sp__head"><strong>Spam score</strong><span class="sp__verdict"><span data-outverdict>Likely to land in spam</span></span></header>
      <div class="sp__dial">
        <svg viewBox="0 0 200 110" role="img" aria-label="Score dial" data-svg>
          <path class="sp__zone sp__zone--bad" d="M20 100A80 80 0 0 1 75.280 23.920"></path>
          <path class="sp__zone sp__zone--mid" d="M75.280 23.920A80 80 0 0 1 147.020 35.280"></path>
          <path class="sp__zone sp__zone--good" d="M147.020 35.280A80 80 0 0 1 180 100"></path>
          <g data-needle><path class="sp__needle" d="M100 100V36"></path></g>
          <circle class="sp__hub" cx="100" cy="100" r="6.500"></circle>
        </svg>
        <p class="sp__score"><b data-outscore>3.1</b><span>of 10</span></p>
      </div>
      <p class="sp__subject"><span class="sp__cap">Subject</span><span class="sp__line"><mark data-w="free">FREE</mark><mark data-w="bang">!!!</mark> Win a prize <mark data-w="now">NOW</mark></span></p>
      <ul class="sp__fixes">
        <li><button type="button" role="checkbox" aria-checked="false" data-fix="caps"><i><svg viewBox="0 0 14 14" aria-hidden="true"><path pathLength="1" d="m3 7.300 2.600 2.600L11 4.200"></path></svg></i><span>Drop the ALL CAPS</span><b>+2.2</b></button></li>
        <li><button type="button" role="checkbox" aria-checked="false" data-fix="bang"><i><svg viewBox="0 0 14 14" aria-hidden="true"><path pathLength="1" d="m3 7.300 2.600 2.600L11 4.200"></path></svg></i><span>Remove the exclamation marks</span><b>+1.9</b></button></li>
        <li><button type="button" role="checkbox" aria-checked="false" data-fix="unsub"><i><svg viewBox="0 0 14 14" aria-hidden="true"><path pathLength="1" d="m3 7.300 2.600 2.600L11 4.200"></path></svg></i><span>Add an unsubscribe link</span><b>+2.4</b></button></li>
      </ul>
    </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.

26 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 “Email spam score” 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 black, a dark card: “Spam score” and on the right the verdict in red, “Likely to land in spam”. In the middle a half dial with three bands, red, yellow and green: the one holding the score is lit, the others dimmed. The white needle starts from the hub at the bottom and on opening climbs to 3.1 with a swing; below, the big mark “3.1” in the band’s colour and “of 10”. Then the subject line, “FREE!!! Win a prize NOW”, with FREE, the exclamation marks and NOW flagged in red. At the bottom three fixes with their checkbox and what they are worth: “Drop the ALL CAPS” (+2.2), “Remove the exclamation marks” (+1.9), “Add an unsubscribe link” (+2.4). Ticking the first turns the checkbox green with its tick drawing itself, FREE and NOW rewrite themselves in lower case and lose their flag, the needle goes to 5.3, overshooting and coming back, the mark counts, the yellow band lights up and the verdict rolls into “Could go either way”. With the other two the exclamation marks disappear, the needle reaches 9.6 in the green band and the verdict becomes “Good to send”. Unticking one takes everything back.

How it works

One number moves the needle

The score is the base plus what every ticked fix is worth. GSAP takes a single number to the new score on an elastic spring: on every frame that number becomes the needle’s rotation around the hub and the mark written below.

Three bands, one lit

The dial is made of three arcs. The band of the score is an attribute on the card: it lights the right arc and gives its colour to the mark, the verdict and the glow.

The subject correcting itself

The risky words are elements of their own. Every fix changes the text of its words, which leave and come back with a small hop, and takes their red flag away.

Values to change

NameFileDefaultWhat it changes
GOODscript.js#3ddc97The colour of a good score and of the fixes made.
BADscript.js#ff6b57The colour of a low score and of the flagged words.
BASEscript.js3.1The email’s score before the fixes, out of 10.
SPRINGscript.js1How much the needle swings as it arrives.

Try them in the Playground

When to use it

In a newsletter or email marketing tool, before sending; the same dial with fixes to tick carries a password’s strength, the quality of a listing, a page’s SEO score or how complete a profile is.

On phones

The card is at most 332 pixels wide and narrows with the screen; the dial is at most 210 pixels wide and never more than half the screen’s height, and the mark and the fix rows are sized on height too. The fixes are whole rows to tap, at least 30 pixels tall.

With reduced motion

Needle and mark go straight to the new score, with no spring and no counting; the subject’s words change at once, the tick is already drawn and the verdict changes without rolling. The demo’s pointer does not start.

Pitfalls

  • The needle turns by writing its group’s transform attribute with the hub in the drawing’s coordinates: this way it turns around the hub at every screen size.
  • The spring overshoots the value: the rotation is held between the dial’s two ends, so the needle stops on the line as if against a pin and never dips below it.
  • The score is not told by colour alone: there are the mark, the verdict in words and an aria-live region. The fixes are real checkboxes.
  • Scores and rules are invented and simplified: real filters also look at the sender, the links and the domain’s reputation.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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