Skip to content
animorio
IT
Back to the library

Ad blocker panel

Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

The panel of an ad blocker in the browser: while the page loads, ads, trackers and cookies come in from the sides and end up in the shield, which counts them with a small beat; below, three bars fill up and say where they came from. The site switch pauses the protection: the shield goes dark, gets struck through and everything passes.

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>
<!--
  "Ad blocker panel" 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>Ad blocker panel</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 panel of an ad blocker in the browser: what the page tries to load flies into the shield and is counted,
         the three kinds fill their bars, and the site switch pauses the protection -->
    <section class="ab" data-ab aria-label="Ad blocker">
      <header class="ab__head">
        <span class="ab__site" aria-hidden="true">N</span>
        <div class="ab__titles">
          <h1>northwind.news</h1>
          <p class="ab__state"><span data-state>Protection on</span></p>
        </div>
        <button class="ab__switch" type="button" role="switch" aria-checked="true" aria-label="Protection on this site" data-switch><span class="ab__knob" data-knob></span></button>
      </header>

      <div class="ab__arena" data-arena>
        <div class="ab__shield" data-shield>
          <svg viewBox="0 0 64 64" aria-hidden="true">
            <defs><linearGradient id="ab-g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="var(--tone)" stop-opacity="0.34"></stop><stop offset="1" stop-color="var(--tone)" stop-opacity="0.06"></stop></linearGradient></defs>
            <path class="ab__body" d="M32 5.500l20.500 7v15.300c0 13-8.600 22.300-20.500 27.700-11.900-5.400-20.500-14.700-20.500-27.700V12.500Z"></path>
            <path class="ab__slash" data-slash pathLength="1" d="M13 51L51 13"></path>
          </svg>
          <span class="ab__total" data-total>0</span>
        </div>
      </div>
      <p class="ab__sum"><span data-sum>Nothing blocked yet</span></p>

      <ul class="ab__rows">
        <li class="ab__row" data-row tabindex="0"><span class="ab__name">Ads</span><span class="ab__bar"><i data-bar></i></span><span class="ab__more"><span data-more>0</span></span></li>
        <li class="ab__row" data-row tabindex="0"><span class="ab__name">Trackers</span><span class="ab__bar"><i data-bar></i></span><span class="ab__more"><span data-more>0</span></span></li>
        <li class="ab__row" data-row tabindex="0"><span class="ab__name">Cookies</span><span class="ab__bar"><i data-bar></i></span><span class="ab__more"><span data-more>0</span></span></li>
      </ul>
      <span class="ab__say" data-say aria-live="polite"></span>
    </section>

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

24 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 “Ad blocker panel” 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 near black, a dark panel: at the top the site’s white tile with its “N”, “northwind.news”, “Protection on” and a purple switch turned on. In the middle a purple shield with the number inside, and under it the line “Nothing blocked yet”. Then three rows, Ads, Trackers and Cookies, each with a bar and a number. While the page loads, small purple pills rush in from right and left, shrink and vanish into the shield: at each one the shield beats, the number goes up, the bar of its kind grows and the line below says how many megabytes were saved; then the arrivals thin out. Move over a row and it lights up, and in place of the number comes the domain most of them came from. Turn the switch off and the knob slides with a bounce, all the purple turns grey, a slash draws itself across the shield, the words roll into “Paused on this site” and the pills, grey now, cross the shield without stopping. Turn it back on and the shield returns on a spring and the count resumes.

How it works

The arrivals

A delayed call that calls itself again sends a pill every RATE seconds for the first BURST, then every IDLE; a seeded generator picks kind, side and height, so the run is always the same.

Into the shield

The pill flies towards the centre with two keyframes, shrinks and fades; at the end it adds one to its kind’s count and the shield gives a beat.

One drawing

One function writes the total, takes the three bars to their size (the largest of the three counts sets the scale) and updates the megabytes line.

The pause

A class changes the colour of everything through a CSS variable; the slash draws itself with the dashoffset and the new pills cross the shield without counting.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#7c6cffThe colour of the shield, of the switch and of the bars.
BURSTscript.js14How many items rush in while the page loads.
RATEscript.js0.32The seconds between one item and the next while loading.
IDLEscript.js1.7The seconds between one item and the next once the page has loaded.
SPRINGscript.js1How much the shield and the switch bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer looks at one kind, pauses the protection and turns it back on.

Try them in the Playground

When to use it

In the panel of an extension or of a privacy-minded browser, in a VPN or antivirus app, in a privacy report. On such a product’s site, to show in a few seconds what it stops.

On phones

The same panel, 300 pixels wide at most: the pills start from the panel’s edges whatever the width; in place of the hover, a tap on a row shows the domain and another tap removes it.

With reduced motion

No flying pills and no beats: the numbers and the bars still go up, because they are the data, and the switch, the shield and the slash change at once. The demo does not click by itself.

Pitfalls

  • Site, domains and numbers are made up and nothing is really blocked: in a real extension the counts come from the engine that filters the requests.
  • The switch has role=switch and aria-checked; the counts are not read at every arrival, only the state when it changes.
  • The pills are elements created and removed at every arrival: once the page has loaded they are few, but at a high rate it pays to reuse them.
  • The bars’ scale starts at 12: without a minimum, the first item would fill the whole bar at once.
  • The colour of everything goes through a single CSS variable (--tone): that way a class on the panel is enough when paused.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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