
The elastic button
Buttons, Hover, Text
The shopping list of a made-up app, split by aisle, on white with a single green: ticking an item fills its box, draws the check and runs a line through the words; when an aisle is finished it folds into a single line and sinks to the bottom while the others rise. Clean product-interface style, with short springs.
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>
<!--
"Shopping list by aisle" 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 shopping list whose aisles fold away when done</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 shopping list split by aisle: ticking an item draws its check and runs a line through it; when every item of an
aisle is ticked the aisle folds into one line and slides to the bottom, the others rise to take its place.
Tapping a folded aisle opens it again; unticking an item sends the aisle back where it was -->
<section class="list" data-card aria-label="Saturday shop">
<header class="list__head">
<div class="list__brand">
<svg class="list__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 8h14l-1.4 10.2a2 2 0 0 1-2 1.8H8.4a2 2 0 0 1-2-1.8z"/><path d="M9 8V6.5a3 3 0 0 1 6 0V8"/></svg>
<div>
<p class="list__title">Saturday shop</p>
<p class="list__sub"><span data-shop>Tillery</span> · 3 aisles</p>
</div>
</div>
<p class="list__left" aria-live="polite"><span class="roll" data-total>6</span> left</p>
</header>
<div class="bar" aria-hidden="true"><span class="bar__fill" data-bar></span></div>
<p class="done-all" data-alldone aria-live="polite">
<svg viewBox="0 0 24 24" aria-hidden="true"><path class="done-all__ring" d="M12 3.5a8.5 8.5 0 1 1 0 17 8.5 8.5 0 0 1 0-17z"/><path class="done-all__tick" data-alltick d="M8 12.3l2.7 2.7L16.2 9.5"/></svg>
<span>All done. Six things in the bag.</span>
</p>
<div class="aisles" data-aisles>
<section class="aisle" data-aisle data-i="0">
<button class="aisle__head" type="button" data-ahead aria-expanded="true">
<span class="aisle__name">Produce</span>
<svg class="aisle__check" viewBox="0 0 24 24" aria-hidden="true"><path data-acheck d="M6 12.5l4 4L18 8.5"/></svg>
<span class="aisle__left"><span class="roll" data-aleft>3 left</span></span>
<svg class="aisle__chev" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10l5 5 5-5"/></svg>
</button>
<div class="aisle__body" data-abody>
<div class="aisle__inner">
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Lemons<span class="strike" data-strike></span></span><span class="item__qty">× 4</span></button>
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Baby spinach<span class="strike" data-strike></span></span><span class="item__qty">1 bag</span></button>
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Avocados<span class="strike" data-strike></span></span><span class="item__qty">× 2</span></button>
</div>
</div>
</section>
<section class="aisle" data-aisle data-i="1">
<button class="aisle__head" type="button" data-ahead aria-expanded="true">
<span class="aisle__name">Dairy</span>
<svg class="aisle__check" viewBox="0 0 24 24" aria-hidden="true"><path data-acheck d="M6 12.5l4 4L18 8.5"/></svg>
<span class="aisle__left"><span class="roll" data-aleft>2 left</span></span>
<svg class="aisle__chev" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10l5 5 5-5"/></svg>
</button>
<div class="aisle__body" data-abody>
<div class="aisle__inner">
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Oat milk<span class="strike" data-strike></span></span><span class="item__qty">× 2</span></button>
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Greek yogurt<span class="strike" data-strike></span></span><span class="item__qty">500 g</span></button>
</div>
</div>
</section>
<section class="aisle" data-aisle data-i="2">
<button class="aisle__head" type="button" data-ahead aria-expanded="true">
<span class="aisle__name">Bakery</span>
<svg class="aisle__check" viewBox="0 0 24 24" aria-hidden="true"><path data-acheck d="M6 12.5l4 4L18 8.5"/></svg>
<span class="aisle__left"><span class="roll" data-aleft>1 left</span></span>
<svg class="aisle__chev" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10l5 5 5-5"/></svg>
</button>
<div class="aisle__body" data-abody>
<div class="aisle__inner">
<button class="item" type="button" data-item role="checkbox" aria-checked="false"><span class="box"><svg viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4L18 8.5"/></svg></span><span class="item__name">Sourdough loaf<span class="strike" data-strike></span></span><span class="item__qty">1</span></button>
</div>
</div>
</section>
</div>
</section>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.4-4.2 2.8 6.2 2.8-1.2-2.8-6.1h6.2Z"/></svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/Flip.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.
39 values to change
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 “Shopping list by aisle” from Animorio and fit it into my siteTicking is three staggered tweens: the box fills and springs back from 0.78 with back.out, the check draws through its strokeDashoffset, and a line as wide as the name grows in scaleX from the left while the words turn grey. Unticking does the same in reverse, with the line withdrawing to the right.
Each number is a one-line cell with hidden overflow: the old figure leaves upwards and the new one comes from below, so a falling count reads like something being used up.
When an aisle is finished a timeline takes its body to zero height, then Flip records the aisles’ positions, puts them back in order in the DOM (the ones to do, then the finished ones in the order they were finished) and animates the move with back.out. Opening does the reverse.
The card keeps the height of the fully open list as its minimum, measured on load and on every resize: folding aisles leave room at the bottom instead of making the card jump in the box.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOP | script.js | Tillery | The name of the grocery app, under the title. |
ACCENT | script.js | #2f7d4f | The colour of the ticked boxes, the bar and the finished aisles. |
FOLD | script.js | 0.38 | The seconds a finished aisle takes to fold into one line. |
SPRING | script.js | 0.75 | The seconds the folded aisle takes to sink while the others rise. |
STRIKE | script.js | 0.32 | The seconds of the line running through a ticked item. |
PAUSE | script.js | 0.55 | The seconds the autopilot waits between one tap and the next. |
HOLD | script.js | 2.2 | The seconds «All done» stays before the list starts over. |
For a grocery or pantry app, a packing list for a trip, the day’s tasks split by room or by project, the checkout of an online supermarket with in-store pickup.
The card takes the width of the box, and the rows, the aisle headers and the text are sized on height too with clamp and vh, so three aisles and six items fit in the phone’s low box. A tap does what a click does.
No bounces, no running lines, no sinking aisles: items change colour, finished aisles fold and move at once, «All done» fades in and the drawn pointer stays hidden.
GSAP 3.15.0, Flip (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.7 KB; the libraries: GSAP + Flip 37 KB.
Tested on 27 October 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.