Skip to content
animorio
IT
All components

Mark all read panel

Notifications, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.8 KBGSAP 28 KBFreeDownload the zip

A team app’s notifications panel, on black: unread rows carry a light tint and a fuller title, and the bell at the top holds the count. Pressing Mark all as read turns the rows quiet one after another from the top, with a pass of light and a one-pixel settle, while the number on the badge rolls down until it disappears; then the rows leave together with the panel’s height and «You’re all caught up» appears with its thin line drawing.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Mark all read 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>The notifications panel that marks everything as read</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" data-stage>
    <!-- a team app's notifications: Mark all as read turns the unread rows off one by one from the top,
         the bell's badge counts down to nothing, and the panel settles on "You're all caught up" -->
    <div class="wrap" data-wrap>
      <header class="bar">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 13.5c2.6-5.2 6.8-7.7 13-8-1.9 4.9-5.6 8.3-11.4 9.1"/><path d="M5.6 14.4 9.8 10.2"/></svg>
          Plover
        </span>
        <button class="bell" data-bell type="button" aria-label="Notifications, 4 unread">
          <span class="bell__icon" data-bell-icon>
            <svg viewBox="0 0 24 24" aria-hidden="true">
              <path d="M6.2 16.6V11a5.8 5.8 0 0 1 11.6 0v5.6l1.5 1.7H4.7Z"/>
              <path class="bell__clapper" data-clapper d="M10 20.4a2.2 2.2 0 0 0 4 0"/>
            </svg>
          </span>
          <span class="badge" data-badge aria-hidden="true">
            <span class="badge__roll"><span class="badge__num" data-num-a>4</span><span class="badge__num" data-num-b></span></span>
          </span>
        </button>
      </header>

      <section class="panel" data-panel aria-label="Notifications">
        <div class="panel__head">
          <h1 class="panel__title">Notifications</h1>
          <button class="mark" data-mark type="button">
            <svg class="mark__icon" viewBox="0 0 24 24" aria-hidden="true">
              <path class="mark__tick mark__tick--a" data-tick-a pathLength="1" d="M2.8 12.6 6.6 16.3 14.2 8.4"/>
              <path class="mark__tick mark__tick--b" data-tick-b pathLength="1" d="M10.6 15.4 11.6 16.3 19.2 8.4"/>
            </svg>
            <span class="mark__label">Mark all as read</span>
          </button>
        </div>

        <div class="panel__body" data-body aria-live="polite">
          <ul class="list" data-list></ul>

          <div class="empty" data-empty hidden>
            <svg class="empty__art" viewBox="0 0 120 64" aria-hidden="true">
              <path class="empty__line" data-draw pathLength="1" d="M18 34h22l5 9h30l5-9h22"/>
              <path class="empty__line" data-draw pathLength="1" d="M18 34 29 14h62l11 20v16a4 4 0 0 1-4 4H22a4 4 0 0 1-4-4Z"/>
              <path class="empty__line empty__line--accent" data-draw pathLength="1" d="M50 25.5 57 32 71 18"/>
            </svg>
            <p class="empty__title" data-empty-title>You’re all caught up</p>
            <p class="empty__sub" data-empty-sub>Nothing new since 9:41</p>
          </div>
        </div>
      </section>
    </div>

    <template data-tpl>
      <li class="row" data-row>
        <button class="row__hit" type="button" data-hit>
          <span class="row__tint" data-tint aria-hidden="true"></span>
          <span class="row__sweep" data-sweep aria-hidden="true"></span>
          <span class="row__avatar" data-avatar aria-hidden="true"></span>
          <span class="row__text">
            <span class="row__title" data-title></span>
            <span class="row__meta" data-meta></span>
          </span>
          <span class="row__time" data-time></span>
        </button>
      </li>
    </template>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.

18 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 “Mark all read 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 a black background, at the top there is the Plover app bar with the bell in a rounded box and the blue badge holding the number of unread notifications, 4. Below it, the Notifications panel: to the right of the title the Mark all as read button with its double tick; in the list four unread rows, each with an avatar (initials on a pastel colour or a drawn icon), the title, the grey line beneath and the time: Ines Ward mentioning you, the Q4 roadmap shared with you, Theo Brandt approving request #482, standup moved to 10:30. Unread rows have no dots: you tell them by the faint blue tint and the fuller title. A drawn pointer passes over a row, which lightens, and presses Mark all as read: the button squeezes and springs back, the double tick draws itself again, and the rows go quiet one after another from the top. In each one the tint fades, a pass of light crosses it from left to right, the title loses weight (the variable font’s wght axis drops from 600 to 440) and turns grey, and the row dips one pixel and springs back. With each row the number on the badge rolls, the old one leaving downwards before the new one comes in from above, and at zero the badge closes. Shortly after, the rows rise away one by one while the panel’s height adapts, and in their place a thin-line tray with a blue tick draws itself, followed by «You’re all caught up» and «Nothing new since 9:41». A few seconds later new notifications arrive: the bell rings, the rows drop in one at a time and the badge climbs back.

How it works

Unread without dots

Each row has a layer behind it with the accent tint at 8.5%, and the title’s weight sits in a CSS variable, --w, used in font-variation-settings. Marking it read means fading the tint and taking --w from 600 to 440 with GSAP, which animates CSS variables too: no dot in front, and the change still reads clearly.

The pass of light

Inside the row, which has overflow hidden, a band with a gradient fading at both ends goes from xPercent -110 to 110 in 0.58 seconds with power2.inOut, beneath the text (z-index -1 with isolation: isolate on the row). At the same time the row dips one pixel in a tenth of a second and comes back with elastic.out: the settle that makes the change felt.

The badge that rolls its count

The number sits in a 19 pixel window with two numbers on top of each other that swap places. First the old one leaves downwards in 0.13 seconds, then the new one comes in from above with back.out: there are never two readable numbers in the same spot. At zero the badge closes with back.in; when the first new notification arrives it opens again with back.out and the bell swings on its hook.

Rows and height going down together

At the end the panel’s height is locked in pixels, the rows rise away with a 0.05 second stagger and meanwhile the height moves to that of the empty state, measured beforehand while hidden. The tray drawing is made of paths with pathLength 1, written with stroke-dashoffset from 1 to 0; the blue tick arrives last with a small snap of scale.

Values to change

NameFileDefaultWhat it changes
UNREADscript.js4How many unread notifications arrive in the panel, from 2 to 5.
ROW_GAPscript.js0.14How many seconds between one row going quiet and the next.
ACCENTscript.js#8fa8ffThe colour of the badge, the unread rows’ tint and the button.
CAUGHT_UP_HOLDscript.js2.4How many seconds «You’re all caught up» stays before new notifications arrive.
TEAMscript.jsPloverThe team app’s name, top left.

Try them in the Playground

When to use it

In team apps, back offices and dashboards, where notifications pile up: the panel under the bell with a single button to clear it, showing row by row what has been marked as read and ending with a reassuring empty state. A single row can also be tapped to mark just that one.

On phones

The panel is at most 94% of the window wide and the rows are between 40 and 56 pixels tall depending on the height (clamp with vh), so the bar, the panel and four rows fit in the 341 by 410 box. Tapping a row marks it as read, like a click.

With reduced motion

No movement: the tint and the title’s weight change with a fade, the pass of light and the settle are gone, the badge number fades (the old one disappears before the new one shows), the bell doesn’t swing and the empty state appears already drawn.

Pitfalls

  • Never a dot to say unread: the site’s rules forbid them, and the tint plus the title’s weight are enough.
  • Two numbers in the same spot cross-fading read as one on top of the other: the old one leaves first, then the new one comes in.
  • The pass of light must sit beneath the text: isolation: isolate on the row and z-index -1 on the band, otherwise it crosses the words and bleaches them.
  • The empty state is measured before showing it (hidden, absolutely positioned), so height and content change together and the panel is never briefly empty and tall.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 29 October 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 components