Skip to content
animorio
IT
Back to the library

Smart home notifications

Physics, HoverGSAP, CSS onlyAdvancedCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The notifications of a made-up smart home app, Tessel Home, stacked as dark glass cards on a near black page with the warm light of a lamp behind. When a new one drops in from the top it pushes the others, which spring aside each on its own spring, chained to the one in front, and settle with a pixel of overshoot. On hover the stack fans open; any card can be grabbed and flung sideways with its real speed, it slows down with friction and the stack closes behind it.

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>
<!--
  "Smart home notifications" 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 smart home notification stack that springs aside</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>
    <!-- the notification stack of a made-up smart home app, Tessel Home: dark glass cards stacked as one, the ones
         behind smaller and peeking out below. A new one drops in from the top and pushes the others back, each on a
         spring chained to the one in front. Hover (or tap) fans the stack open; grab a card and fling it sideways:
         it keeps its real speed, slows with friction and the stack closes behind it -->
    <span class="glow" aria-hidden="true"><span class="glow__a"></span><span class="glow__b"></span></span>

    <section class="panel" data-panel aria-label="Notifications">
      <header class="head" data-head>
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
            <path d="M3.2 9.4L10 3.6l6.8 5.8v6.4a1.4 1.4 0 0 1-1.4 1.4H4.6a1.4 1.4 0 0 1-1.4-1.4z" />
            <path class="brand__door" d="M8.1 17.2v-4.1h3.8v4.1" />
          </svg>
          <span class="brand__name">Tessel Home</span>
        </span>
        <span class="count" aria-label="new notifications">
          <span class="count__win"><span class="count__roll" data-roll></span></span>
          <span class="count__word" data-word>new</span>
        </span>
      </header>

      <div class="stack" data-stack>
        <p class="stack__empty" data-empty>
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.2 10.4l3.1 3.1 6.6-7" /></svg>
          <span>All quiet at home</span>
        </p>
      </div>

      <p class="hint" data-hint>Hover to fan out, fling one away</p>
    </section>

    <template data-card>
      <article class="note">
        <span class="note__shadow" aria-hidden="true"></span>
        <div class="note__glass">
          <span class="note__sheen" aria-hidden="true"></span>
          <span class="note__icon"><svg viewBox="0 0 24 24" aria-hidden="true"></svg></span>
          <span class="note__text">
            <span class="note__top"><span class="note__room"></span><time class="note__time"></time></span>
            <b class="note__title"></b>
            <span class="note__line"></span>
          </span>
          <span class="note__edge" aria-hidden="true"></span>
        </div>
      </article>
    </template>

    <svg class="pointer" data-pointer viewBox="0 0 20 20" aria-hidden="true">
      <path d="M4.5 2.8l10.6 8.1-4.6.6 2.6 5.1-2.1 1-2.6-5.1-3.4 3.2z" />
    </svg>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

22 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 “Smart home notifications” 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 near black page, with the warm light of a lamp and a cool reflection slowly breathing behind, sits the notification stack of Tessel Home: at the top the brand with its little house and the count of new ones, which rolls when it changes. The notifications are dark glass cards with grain, a one pixel edge that catches the light at the top, the room’s amber icon, the room’s name, the time, the title and one line: the washing is done, the living room is at 21 °C, the front door was unlocked, a parcel at the door, the bedroom window still open, the car charged to 80%. Closed, the stack shows only the first: the two behind are smaller and peek out ten pixels below, glass only. A new notification drops in from the top with its edge lit amber; when it touches the stack it pushes it, and the push runs back along the chain: each card steps back on its spring a little after the one in front and settles passing its mark by a pixel. Past five, the oldest fades away at the back. When the pointer passes over, the stack fans open into a list, the cards turned slightly in turn and their text coming back. A card grabbed with a finger lifts with a growing shadow and tilts as it is carried; let go with a swing it flies off sideways at its own speed, slows down with friction and fades, and the others rise to close the gap; let go gently it springs back. Left alone a notification comes in every three seconds and a drawn pointer opens the stack, flings one to the right, then swipes one to the left from the closed stack.

How it works

A spring for each card

Each card has a position, a scale, a sideways shift and a rotation, each with its own velocity, integrated by hand in three steps per frame on the GSAP ticker: acceleration equals minus stiffness times distance minus damping times velocity. With stiffness 250 and damping 23 the spring passes its mark by a little and settles.

Where each card sits

The place function blends two stacks by an openness from 0 to 1: closed, the cards behind drop by ten pixels and shrink by 5.5% from the bottom, so only their edge shows; open, they are a list turned one degree in turn. The openness has its own spring too, so the fan passes its mark and comes back.

The chained push

The new card falls on a stiffer spring; when it reaches its place the others take their new places and get a push that drops by 28% at each card. On top of that a card can never be closer to the one in front than half a peek: if it gets there it takes some of that card’s speed, and so the push runs down the stack.

The fling with the real speed

While dragging, the points of the last 90 ms are kept; on release the speed is the distance over the time between the first and the last. With exponential friction the card stops after speed over friction: if that is outside the stack, or the speed passes the threshold, it flies off and fades, otherwise it springs back.

The glass and the pilot

The glass is a gradient with backdrop-filter and grain; a diagonal sheen moves with the tilt and the drag, the shadow grows with a CSS variable. The drawn pointer is a GSAP timeline calling the same functions as the finger, grab, drag and release, and it stops as soon as the real mouse moves.

Values to change

NameFileDefaultWhat it changes
STIFFNESSscript.js250The spring pulling each card to its place: higher is quicker.
DAMPINGscript.js23Lower lets the cards pass their place and come back.
PUSHscript.js1How hard a new notification pushes the others when it lands, 0 for none.
PEEKscript.js10How many pixels each card behind peeks out.
FANscript.js1How much the open stack fans out, 0 for a straight list.
FRICTIONscript.js3.4How quickly a flung card slows down.
FLINGscript.js650The release speed, in pixels per second, above which the card flies off.
EVERYscript.js3Seconds between two notifications when the demo runs by itself.
MAXscript.js5How many cards the stack keeps: past that the oldest fades away.
LOOPscript.jstrueLeft alone, notifications keep coming and the drawn pointer flings them away.

Try them in the Playground

When to use it

For the notification centre of a smart home app, a work panel or a dashboard: wherever many short alerts come in and should be browsable and dismissable with one gesture.

On phones

The same animation with adapted sizes: the card is as wide as the box, shorter on a short screen, and the open stack shows as many cards as fit in the height. With a finger a tap opens and closes the fan, a sideways drag flings the card; the page still scrolls vertically.

With reduced motion

No springs or flights: the cards are already in place, a new notification fades in and a click on a card fades it away; the stack opens and closes without motion.

Pitfalls

  • Glass that is too clear lets the text of the cards behind show through the front one: the content of the cards behind fades out while the stack is closed and comes back as it opens.
  • If the cards behind took their new place as soon as the notification is born, they would step back before being touched: the place changes only when the new one lands, and that is where the push starts.
  • With friction a card flung softly would stop in the middle of the page: on release the script works out where it would stop and, if it has to leave, the speed goes up to the minimum needed.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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