Skip to content
animorio
IT
All components

AI memory card

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

The memory of Orra, a made-up AI assistant: under one of its answers the «Memory updated» pill appears, its bookmark drawing itself and a light sweeping across. Tapped, the pill springs open into the «What Orra remembers» card: the saved memories in a row, and the new one, «Vegetarian», arriving on top with a New tag while the others slide down and the counter rolls from 3 to 4. Hovering a memory shows Forget: pressed, the row blurs away to the side, the ones below rise on a spring and the counter rolls back. The cross folds the card back into the pill. On white, with a single pine green accent.

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>
<!--
  "AI memory card" 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>AI memory card</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 frame the preview films: as big as the open card, so nothing is cut while it grows -->
    <span class="frame" data-frame aria-hidden="true"></span>

    <!-- an answer of Orra, a made-up assistant: under it the small «Memory updated» pill,
         which opens into the card of what Orra remembers about you; every memory can be forgotten -->
    <section class="chat" data-chat aria-label="Orra, your assistant">
      <div class="msg" data-msg>
        <span class="msg__who" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M10 3.2a6.8 6.8 0 1 0 6.8 6.8"/><path d="M10 6.6a3.4 3.4 0 1 0 3.4 3.4"/></svg>
        </span>
        <p data-msg-txt>Noted. I found three vegetarian places within ten minutes of your office.</p>
      </div>

      <div class="memwrap">
        <div class="mem" data-mem>
          <span class="mem__light" aria-hidden="true" data-light></span>

          <button class="pill" type="button" data-pill data-autoclic aria-expanded="false" aria-controls="mem-card">
            <span class="pill__ico" aria-hidden="true">
              <svg viewBox="0 0 20 20">
                <path class="bm" data-bm d="M6 3.4h8a1 1 0 0 1 1 1v12.2l-5-3.3-5 3.3V4.4a1 1 0 0 1 1-1z" pathLength="1"/>
                <path class="sp" data-sp d="M10 6.2v3.6M8.2 8h3.6"/>
              </svg>
            </span>
            <span class="pill__txt">Memory updated</span>
          </button>

          <div class="card" id="mem-card" data-card role="region" aria-label="What Orra remembers">
            <header class="card__head">
              <span class="card__ico" aria-hidden="true">
                <svg viewBox="0 0 20 20"><path d="M6 3.4h8a1 1 0 0 1 1 1v12.2l-5-3.3-5 3.3V4.4a1 1 0 0 1 1-1z"/></svg>
              </span>
              <span class="card__title">
                <b>What Orra remembers</b>
                <span class="count" aria-live="polite"><span class="count__win" data-count><span>3</span></span><span class="count__lab" data-count-lab>memories</span></span>
              </span>
              <button class="shut" type="button" data-shut aria-label="Close memories">
                <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.6 4.6l6.8 6.8M11.4 4.6l-6.8 6.8"/></svg>
              </button>
            </header>
            <ul class="list" data-list></ul>
            <p class="card__foot" data-foot>Orra uses these to tailor answers. You can forget any of them.</p>
          </div>
        </div>
      </div>
    </section>
  </main>

  <template data-row>
    <li class="row">
      <span class="row__light" aria-hidden="true"></span>
      <span class="row__main"><b class="row__txt"></b><span class="row__meta"></span></span>
      <span class="row__new" aria-hidden="true"><span>New</span></span>
      <button class="forget" type="button"><span>Forget</span></button>
    </li>
  </template>

  <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

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 “AI memory card” 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

An answer from Orra arrives word by word beside its black circle; under it the «Memory updated» pill springs in, the green bookmark draws itself, the plus inside pops out and a light crosses the pill. Tapped, the pill shrinks a touch and the box springs wider until it becomes the «What Orra remembers» card, with the header, three memories and a line at the bottom arriving one after another. The new memory, «Vegetarian · Just now», comes in on top with a New tag popping out and a light sweeping across it; the others slide down one row on a spring and the counter rolls from 3 to 4. Hovering a row shows a grey background and the Forget button: pressed, the row blurs away to the side, the ones below rise on a spring, the card gets shorter and the counter goes back to 3. The cross, or Esc, folds the card back into the pill. If nobody touches it, the demo does everything by itself and starts over.

How it works

One box, two faces

Pill and card live in the same box with overflow hidden: the pill in the flow, the card on top in absolute position, as wide as the column. To open, the pill and the card are measured and the box’s width, height and radius are animated on a spring, while the pill fades and the card’s pieces arrive staggered.

The new row on top

The new memory goes on top of the list: the previous rows, pushed down by the layout, start at y equal to minus its height and spring back to zero (FLIP), so they seem to slide down. The box follows the card’s new height.

Forgetting without jumps

The row being forgotten leaves the flow where it is (absolute, with its own position and width), so the rows below move up in the layout at once; they are animated from y equal to its height to zero on a spring, while the row blurs away to the side and is then removed.

The window counter

The number sits in a one-digit window with overflow hidden: the new digit comes in from below or from above depending on whether the count goes up or down, the old one leaves the other way.

Values to change

NameFileDefaultWhat it changes
SPRINGscript.js0.62How springy the box is when the pill opens into the card (lower = more bounce).
OPEN_TIMEscript.js0.8Seconds the pill takes to open into the card.
AUTO_OPENscript.js1.3Seconds the pill waits before the demo opens it by itself.
AUTO_HOLDscript.js1.9Seconds the card stays still before the demo forgets a memory.
AUTO_PAUSEscript.js2Seconds of quiet, closed, before the demo starts over.
IDLEscript.js6Seconds after your last touch before the demo plays by itself again.

Try them in the Playground

When to use it

In apps with an AI assistant that remembers its user’s preferences: it says right away that something was saved without interrupting the chat, and lets people see and delete what it knows, right where it came from.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the card and the answer fit the phone box. On touch screens Forget is always visible, since there is no hover there.

With reduced motion

No springs or movement: the pill becomes the card with a fade, the new and the forgotten memory fade in and out, the counter changes without rolling.

Pitfalls

  • The card is as wide as the column, not as the growing box: its width is fixed in pixels and recomputed on resize, otherwise the text would wrap while it opens.
  • The rows rising after a deletion are not animated through the leaving row’s height (GSAP from auto to zero jumps): the row leaves the flow and the others move with transforms.
  • GSAP rounds values read from the CSS: with autoRound off the bookmark with pathLength 1 draws itself instead of popping in.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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