Skip to content
animorio
IT
Back to the library

Webmentions

Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 6.5 KBGSAP 28 KBFreeDownload the zip

The mentions under a blog post, gathered from the rest of the web: likes, reposts and replies in three views. On changing view the pill slides and the faces arrive one after the other on a spring, or the replies come in from the side with who wrote them and from where. “Check for new mentions” runs a line, then the new mentions land in their place and the counts jump.

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>
<!--
  "Webmentions" 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>Webmentions</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 webmentions under a blog post: likes, reposts and replies gathered from around the web, three views
         with the faces arriving one after the other, and new mentions landing when it checks again -->
    <section class="wm" data-wm aria-labelledby="wm-title">
      <header class="wm__head">
        <span class="wm__name"><b id="wm-title">Around the web</b><span class="wm__whenroll"><span data-when>Mentions of this post</span></span></span>
        <span class="wm__total" aria-live="polite"><b data-total>33</b><span>mentions</span></span>
      </header>

      <div class="wm__tabs" role="tablist" aria-label="Kind of mention" data-tabs>
        <i class="wm__pick" data-pick aria-hidden="true"></i>
        <button class="wm__tab" type="button" role="tab" aria-selected="true" data-tab="likes">Likes <b data-n>24</b></button>
        <button class="wm__tab" type="button" role="tab" aria-selected="false" tabindex="-1" data-tab="reposts">Reposts <b data-n>6</b></button>
        <button class="wm__tab" type="button" role="tab" aria-selected="false" tabindex="-1" data-tab="replies">Replies <b data-n>3</b></button>
      </div>

      <div class="wm__body" data-body role="tabpanel"></div>

      <button class="wm__go" type="button" data-go><i class="wm__bar" data-bar aria-hidden="true"></i><span class="wm__gotext"><span data-golabel>Check for new mentions</span></span></button>
    </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.

23 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 “Webmentions” 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 card: “Around the web”, “Mentions of this post” and on the right the large total, “33 mentions”. Below, three tabs in a row with their count: Likes 24, Reposts 6, Replies 3, with a paler pill on the chosen one and its count in pink. In the panel below, for Likes, a grid of rounded tiles with initials, each in its own colour, which on opening arrive one after the other growing on a spring. Move to Replies and the pill slides, the grid leaves sideways and three rows arrive: tile, name, “via mastodon.social” and a line of text. Reposts is a shorter grid. At the bottom, “Check for new mentions”: press it and it becomes “Checking” and a pink line runs along the button’s edge; then it says “3 new mentions”, the total counts to 36, the tabs’ counts jump and, in the Likes view, two solid pink tiles enter at the top of the grid with a bounce; among the replies a new one arrives at the top. Under the title the line becomes “Checked just now”. A second check answers “Nothing new yet”.

How it works

Three lists

The state is three lists (likes, reposts, replies). The tabs’ counts and the total are their lengths; each view is built from the list of its kind, with text nodes and never with innerHTML.

Changing view

The old view leaves in 140 milliseconds on the right side, then the new one takes its place: the tiles grow from 0.3 on a spring, STAGGER seconds apart; the replies come in from the side.

The panel does not change height

The three views sit in the same panel 150 pixels tall: the card stays still whichever tab is chosen.

Checking

A line at the bottom of the button grows with scaleX for CHECK seconds; at the end the new mentions enter the lists, the counts update with a jump and the view in sight is rebuilt animating only the new ones.

The tabs are tabs

role tablist, tab and tabpanel, with the keyboard arrows; the pill moves in percent.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff6b8bThe colour of the counts, of the mentions just arrived and of the checking line.
STAGGERscript.js0.022The delay between one face and the next when a view comes in.
CHECKscript.js1.3How many seconds the check for new mentions lasts.
SPRINGscript.js1How much the faces and the tabs’ pill bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer goes through the three views and checks for new mentions.

Try them in the Playground

When to use it

At the bottom of a post on a personal blog or newsletter, to show what was said about it elsewhere (Mastodon, Bluesky, other blogs) without a comment system of its own; and on any page that gathers reactions of different kinds.

On phones

The same card, as wide as the screen minus the margins: the tiles stay eight per row and tighten with the width, the tabs are 30 pixels tall and long reply texts are cut with an ellipsis.

With reduced motion

No growing tiles and no rows coming in from the side: the new view takes the old one’s place with a fade, the pill is at once on the right tab, the check takes a moment and the counts change without jumping. The demo does not move by itself.

Pitfalls

  • People, sites and texts are made up and nothing is requested from the network: on a real blog the mentions come from a webmention service, and other people’s text must always be treated as text.
  • The tiles are rounded squares with the initial inside and the name in the title: not status lights.
  • New mentions are not told by pink alone: the button writes how many there are and the tabs’ counts jump.
  • During the check the button is disabled: two checks at once would add the same mentions twice.
  • If mentions arrive of a kind that is not in view, the view is left alone: only the count on its tab changes.
  • The demo’s pass starts again when the check has really finished, not on a timer: so it also copes with a long CHECK.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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