Skip to content
animorio
IT
All components

Shopping list by aisle

Lists, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP + Flip 37 KBFreeDownload the zip

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.

The code

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>

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.

39 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 “Shopping list by aisle” 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 very light grey background sits the white «Saturday shop» card of Tillery, a made-up grocery app: the drawn bag in a light green square, «Tillery · 3 aisles» and on the right the count «6 left». Below, a thin bar and three aisles, Produce, Dairy and Bakery, each with its name in grey small caps and its own count, with the items and quantities: Lemons × 4, Baby spinach, Avocados × 2, Oat milk × 2, Greek yogurt 500 g, Sourdough loaf. Tapping an item squeezes its box and lets it spring back filled with green, the white check draws itself, a line runs through the words from the left and the item fades to grey; the aisle count and the one at the top roll and the bar moves on. When every item of an aisle is ticked, a green check draws itself next to its name, the items fade upwards, the aisle folds into a single line with a small arrow and sinks to the bottom on a spring while the others rise to take its place. Tapping a folded aisle opens it again on the ticked items; unticking one sends the aisle back to its place. When the list is finished, «All done» appears under the bar with a circle and a check drawing themselves. A drawn pointer does it all by itself, opens and folds an aisle again, then the list starts over; it also works with mouse, touch and keyboard.

How it works

One box, three gestures

Ticking 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.

A rolling count

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.

Fold first, then sink

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 does not jump

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.

Values to change

NameFileDefaultWhat it changes
SHOPscript.jsTilleryThe name of the grocery app, under the title.
ACCENTscript.js#2f7d4fThe colour of the ticked boxes, the bar and the finished aisles.
FOLDscript.js0.38The seconds a finished aisle takes to fold into one line.
SPRINGscript.js0.75The seconds the folded aisle takes to sink while the others rise.
STRIKEscript.js0.32The seconds of the line running through a ticked item.
PAUSEscript.js0.55The seconds the autopilot waits between one tap and the next.
HOLDscript.js2.2The seconds «All done» stays before the list starts over.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • Folding an aisle and moving it at the same time slid the others under a body that was still shrinking: first the fold, then Flip, in sequence on the same timeline.
  • Without a minimum height the card shrank with every folded aisle and jumped up in the box, because it is centred.

Libraries

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.

Testing

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