
The inchworm menu
Menus, Hover, Transitions
People searched for “swipe to delete” and there was no real list with Delete: here is the conversation list of a made-up messaging app, Relay, alone on white. A row drags with the finger or the pointer: to the left Archive, dark, and Delete, red, come out from under it, deepening as you pull; past the threshold Delete takes the whole row with a small snap and the bin lid lifts. Let go earlier and it springs home or rests open on the two buttons; to the right Pin comes out on a rubber band. The deleted row slides off, the rows below rise one after another to close the gap and “Conversation deleted · Undo” arrives at the bottom with a thread that burns down; Undo opens the gap again and the row comes back. Minimal style.
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>
<!--
"Swipe to delete row" 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>Swipe to delete row</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 conversation list of a made-up messaging app, Relay: drag a row to the left and Archive and Delete come out
from under it, keep pulling and Delete takes the whole row; drag it to the right and Pin comes out.
A deleted row slides away, the rows below close the gap and a toast offers Undo -->
<div class="wrap" data-wrap>
<section class="card" data-card aria-labelledby="ms-title">
<header class="head">
<h2 class="head__title" id="ms-title">Messages</h2>
<span class="head__count"><span data-count>5</span> chats</span>
<button class="head__new" type="button" aria-label="New message">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M11.8 4.4l3.8 3.8M4.2 15.8l1-3.9 8.3-8.3a1.6 1.6 0 0 1 2.3 0l.4.4a1.6 1.6 0 0 1 0 2.3l-8.3 8.3z"></path></svg>
</button>
</header>
<ul class="list" data-list aria-label="Conversations">
<li class="row is-unread" data-row data-name="Maya Okafor">
<div class="under" aria-hidden="false">
<button class="act act--pin" type="button" data-act="pin" tabindex="-1" aria-label="Pin Maya Okafor"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="pin__head" d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path><path d="M6.6 13.4l-3.2 3.2"></path></svg><span class="act__label" data-pin-label>Pin</span></span></button>
<button class="act act--archive" type="button" data-act="archive" tabindex="-1" aria-label="Archive Maya Okafor"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="box__lid" d="M3.2 4.6h13.6v3H3.2z"></path><path d="M4.4 7.6v7.2a1.4 1.4 0 0 0 1.4 1.4h8.4a1.4 1.4 0 0 0 1.4-1.4V7.6M8.2 10.6h3.6"></path></svg><span class="act__label">Archive</span></span></button>
<button class="act act--delete" type="button" data-act="delete" tabindex="-1" aria-label="Delete Maya Okafor"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><g class="bin__lid"><path d="M3.4 5.4h13.2M8 5.4V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.4"></path></g><path d="M5 5.4l.8 10.2a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L15 5.4M8.4 8.6v5M11.6 8.6v5"></path></svg><span class="act__label">Delete</span></span></button>
</div>
<div class="face" data-face tabindex="0" role="group" aria-label="Maya Okafor, Sure, I will send the deck over tonight. Swipe or use arrow keys for actions">
<span class="ava" style="--ava: #ece4da; --ava-ink: #7a6247">MO</span>
<span class="txt">
<span class="txt__top"><span class="txt__name">Maya Okafor</span><svg class="pinned" viewBox="0 0 20 20" aria-hidden="true"><path d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path></svg><span class="txt__time">9:41</span></span>
<span class="txt__prev">Sure, I’ll send the deck over tonight</span>
</span>
</div>
</li>
<li class="row is-unread" data-row data-name="Studio Lumen">
<div class="under">
<button class="act act--pin" type="button" data-act="pin" tabindex="-1" aria-label="Pin Studio Lumen"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="pin__head" d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path><path d="M6.6 13.4l-3.2 3.2"></path></svg><span class="act__label" data-pin-label>Pin</span></span></button>
<button class="act act--archive" type="button" data-act="archive" tabindex="-1" aria-label="Archive Studio Lumen"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="box__lid" d="M3.2 4.6h13.6v3H3.2z"></path><path d="M4.4 7.6v7.2a1.4 1.4 0 0 0 1.4 1.4h8.4a1.4 1.4 0 0 0 1.4-1.4V7.6M8.2 10.6h3.6"></path></svg><span class="act__label">Archive</span></span></button>
<button class="act act--delete" type="button" data-act="delete" tabindex="-1" aria-label="Delete Studio Lumen"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><g class="bin__lid"><path d="M3.4 5.4h13.2M8 5.4V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.4"></path></g><path d="M5 5.4l.8 10.2a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L15 5.4M8.4 8.6v5M11.6 8.6v5"></path></svg><span class="act__label">Delete</span></span></button>
</div>
<div class="face" data-face tabindex="0" role="group" aria-label="Studio Lumen, Leo: final cut is up in the shared folder. Swipe or use arrow keys for actions">
<span class="ava ava--group" style="--ava: #e4e7ec; --ava-ink: #4f5866"><svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="7.4" cy="7.6" r="2.4"></circle><circle cx="13.4" cy="8.4" r="1.9"></circle><path d="M3.2 15.2c.5-2.4 2.2-3.7 4.2-3.7s3.7 1.3 4.2 3.7M12 11.6c1.9-.2 3.6.9 4.1 3"></path></svg></span>
<span class="txt">
<span class="txt__top"><span class="txt__name">Studio Lumen</span><svg class="pinned" viewBox="0 0 20 20" aria-hidden="true"><path d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path></svg><span class="txt__time">9:12</span></span>
<span class="txt__prev">Leo: Final cut is up in the shared folder</span>
</span>
</div>
</li>
<li class="row" data-row data-name="Jonas Weber">
<div class="under">
<button class="act act--pin" type="button" data-act="pin" tabindex="-1" aria-label="Pin Jonas Weber"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="pin__head" d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path><path d="M6.6 13.4l-3.2 3.2"></path></svg><span class="act__label" data-pin-label>Pin</span></span></button>
<button class="act act--archive" type="button" data-act="archive" tabindex="-1" aria-label="Archive Jonas Weber"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="box__lid" d="M3.2 4.6h13.6v3H3.2z"></path><path d="M4.4 7.6v7.2a1.4 1.4 0 0 0 1.4 1.4h8.4a1.4 1.4 0 0 0 1.4-1.4V7.6M8.2 10.6h3.6"></path></svg><span class="act__label">Archive</span></span></button>
<button class="act act--delete" type="button" data-act="delete" tabindex="-1" aria-label="Delete Jonas Weber"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><g class="bin__lid"><path d="M3.4 5.4h13.2M8 5.4V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.4"></path></g><path d="M5 5.4l.8 10.2a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L15 5.4M8.4 8.6v5M11.6 8.6v5"></path></svg><span class="act__label">Delete</span></span></button>
</div>
<div class="face" data-face tabindex="0" role="group" aria-label="Jonas Weber, Are we still on for Thursday? Swipe or use arrow keys for actions">
<span class="ava" style="--ava: #e3ebe5; --ava-ink: #4d6b57">JW</span>
<span class="txt">
<span class="txt__top"><span class="txt__name">Jonas Weber</span><svg class="pinned" viewBox="0 0 20 20" aria-hidden="true"><path d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path></svg><span class="txt__time">8:30</span></span>
<span class="txt__prev">Are we still on for Thursday?</span>
</span>
</div>
</li>
<li class="row" data-row data-name="Priya Raman">
<div class="under">
<button class="act act--pin" type="button" data-act="pin" tabindex="-1" aria-label="Pin Priya Raman"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="pin__head" d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path><path d="M6.6 13.4l-3.2 3.2"></path></svg><span class="act__label" data-pin-label>Pin</span></span></button>
<button class="act act--archive" type="button" data-act="archive" tabindex="-1" aria-label="Archive Priya Raman"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="box__lid" d="M3.2 4.6h13.6v3H3.2z"></path><path d="M4.4 7.6v7.2a1.4 1.4 0 0 0 1.4 1.4h8.4a1.4 1.4 0 0 0 1.4-1.4V7.6M8.2 10.6h3.6"></path></svg><span class="act__label">Archive</span></span></button>
<button class="act act--delete" type="button" data-act="delete" tabindex="-1" aria-label="Delete Priya Raman"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><g class="bin__lid"><path d="M3.4 5.4h13.2M8 5.4V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.4"></path></g><path d="M5 5.4l.8 10.2a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L15 5.4M8.4 8.6v5M11.6 8.6v5"></path></svg><span class="act__label">Delete</span></span></button>
</div>
<div class="face" data-face tabindex="0" role="group" aria-label="Priya Raman, Thanks! The keys are with the concierge. Swipe or use arrow keys for actions">
<span class="ava" style="--ava: #f0e6e8; --ava-ink: #8a5560">PR</span>
<span class="txt">
<span class="txt__top"><span class="txt__name">Priya Raman</span><svg class="pinned" viewBox="0 0 20 20" aria-hidden="true"><path d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path></svg><span class="txt__time">Yesterday</span></span>
<span class="txt__prev">Thanks! The keys are with the concierge</span>
</span>
</div>
</li>
<li class="row" data-row data-name="Theo Lindqvist">
<div class="under">
<button class="act act--pin" type="button" data-act="pin" tabindex="-1" aria-label="Pin Theo Lindqvist"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="pin__head" d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path><path d="M6.6 13.4l-3.2 3.2"></path></svg><span class="act__label" data-pin-label>Pin</span></span></button>
<button class="act act--archive" type="button" data-act="archive" tabindex="-1" aria-label="Archive Theo Lindqvist"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><path class="box__lid" d="M3.2 4.6h13.6v3H3.2z"></path><path d="M4.4 7.6v7.2a1.4 1.4 0 0 0 1.4 1.4h8.4a1.4 1.4 0 0 0 1.4-1.4V7.6M8.2 10.6h3.6"></path></svg><span class="act__label">Archive</span></span></button>
<button class="act act--delete" type="button" data-act="delete" tabindex="-1" aria-label="Delete Theo Lindqvist"><span class="act__fill"></span><span class="act__in"><svg viewBox="0 0 20 20" aria-hidden="true"><g class="bin__lid"><path d="M3.4 5.4h13.2M8 5.4V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.4"></path></g><path d="M5 5.4l.8 10.2a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L15 5.4M8.4 8.6v5M11.6 8.6v5"></path></svg><span class="act__label">Delete</span></span></button>
</div>
<div class="face" data-face tabindex="0" role="group" aria-label="Theo Lindqvist, Photo. Swipe or use arrow keys for actions">
<span class="ava" style="--ava: #ebe8f1; --ava-ink: #62587e">TL</span>
<span class="txt">
<span class="txt__top"><span class="txt__name">Theo Lindqvist</span><svg class="pinned" viewBox="0 0 20 20" aria-hidden="true"><path d="M12.6 3.2l4.2 4.2-2.5 1.1-2.9 2.9.4 3.3-1.2 1.2-6.6-6.6 1.2-1.2 3.3.4 2.9-2.9z"></path></svg><span class="txt__time">Mon</span></span>
<span class="txt__prev"><svg class="txt__ico" viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="3.2" width="12" height="9.6" rx="2"></rect><path d="M2.6 11.2l3.4-3.4 2.6 2.6 1.6-1.6 3.2 3.2"></path></svg>Photo</span>
</span>
</div>
</li>
</ul>
<div class="empty" data-empty aria-hidden="true">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4.5 12.8l4.4 4.4L19.5 6.6"></path></svg>
<span>All caught up</span>
<button type="button" class="empty__btn" data-restore>Restore chats</button>
</div>
<div class="toast" data-toast role="status" aria-hidden="true">
<span class="toast__text"><span data-toast-text>Conversation deleted</span><span class="toast__sep" aria-hidden="true">·</span></span>
<button class="toast__undo" type="button" data-undo tabindex="-1">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5.6 4.2L3 6.8l2.6 2.6M3.4 6.8h6a3.4 3.4 0 0 1 0 6.8H7.6"></path></svg>Undo
</button>
<span class="toast__fuse" data-fuse aria-hidden="true"></span>
</div>
</section>
<!-- the drawn pointer of the self-running tour -->
<svg class="hand" data-hand viewBox="0 0 24 24" aria-hidden="true"><path d="M5.2 3.4l13.4 7.2-6 1.4-2.8 5.8z"></path></svg>
</div>
<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>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.
77 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Swipe to delete row” from Animorio and fit it into my siteEach row has the three real buttons underneath (Pin on the left, Archive and Delete on the right) and the white face on top, moved with translate3d. The button widths are worked out every frame from x: Archive and Delete share the uncovered gap, and a full factor from 0 to 1 gives it all to Delete.
With Pointer Events the row waits: if the finger moves more vertically than sideways the page scrolls (touch-action pan-y), if it moves six pixels sideways it captures the pointer and the row takes the movement. Past Pin’s limit the distance goes through a rubber-band curve.
On release the speed of the last 90 milliseconds projects the landing point (PROJECT) and decides: delete, stay open or go home. The spring is integrated every frame with stiffness and damping, so it starts with the finger’s real speed; the step is capped at 1/30 of a second.
When the row passes FULL, GSAP takes full to 1 with back.out and gives the face a five-pixel knock that settles with elastic.out; the bin lid turns 24 degrees on its hinge. Going back under the threshold it all returns.
The deleted row slides out, then the rows below rise by one row height with back.out and a stagger (STAGGER); when done the row goes to display none and the others go back to y 0 with no jump. Undo does the reverse: the row returns to the flow, the others start one row higher and drop, and the face comes back in from the left on the spring.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN | script.js | 140 | How far a row stays open to show Archive and Delete, in pixels. |
FULL | script.js | 0.6 | The share of the row past which Delete takes it all and letting go deletes. |
PIN_AT | script.js | 84 | How far to pull right to pin the chat, in pixels. |
STIFFNESS | script.js | 430 | The stiffness of the spring that brings the row back or opens it. |
DAMPING | script.js | 0.72 | The spring’s damping: 1 no bounce, lower bounces more. |
PROJECT | script.js | 0.1 | How much the flick’s speed counts on release, in seconds. |
STAGGER | script.js | 0.05 | The delay between the rows that close the gap. |
TOAST_TIME | script.js | 4.5 | How many seconds the Undo toast stays. |
LOOP_PAUSE | script.js | 1.6 | The pause before the self-running tour starts again. |
AUTOPLAY | script.js | true | The drawn pointer shows the gestures until you touch the list. |
In the message or email list of an app, in the tasks of a productivity app, in notifications, in a shop’s cart on a phone, in any list where a row is archived, deleted or pinned with a gesture and an undo is needed.
The card takes the width with a margin and the row height also follows the screen height with clamp, so the five rows and the toast fit the phone preview box. Widths are measured again on resize. With a finger the gesture lets the page scroll vertically (touch-action pan-y) and only takes the sideways one.
No slides or springs: one row is already open on Archive and Delete, the self-running tour does not start, a release puts the row straight in place, a deleted row fades out and the others are already in place, the toast fades in and its thread stays still.
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.
Tested on 22 November 2026
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.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.