Skip to content
animorio
IT
All components

Packing list

Lists, HoverGSAP, CSS onlyEasyCompressed weight: Demo 5.3 KBGSAP 28 KBFreeDownload the zip

The packing list of a travel app, on black: each ticked thing adds its weight, the kilo figure rolls and the bar moves towards the notch of the flight’s limit. Go past it and everything turns red, the bar jolts and the line says by how much you are over; take something out and it settles again.

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>
<!--
  "Packing list" 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>Packing list</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 packing list of a travel app: every ticked thing adds its weight, the bar fills towards the
         airline's limit and turns red once the bag is over it -->
    <section class="pk" data-pk aria-labelledby="pk-title">
      <header class="pk__head">
        <div>
          <h1 id="pk-title">Lisbon, 4 days</h1>
          <p class="pk__sub">Cabin bag, <span data-limit>10</span> kg limit</p>
        </div>
        <p class="pk__total"><span class="pk__plus" data-plus aria-hidden="true"></span><b data-total>0.0</b><i>kg</i></p>
      </header>
      <div class="pk__meter" data-meter aria-hidden="true"><span class="pk__bar" data-bar></span><span class="pk__mark" data-mark></span></div>
      <p class="pk__room"><span data-room></span></p>
      <ul class="pk__list">
        <li class="pk__row" data-row data-kg="1.6">
          <button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Laptop, 1.6 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
          <span class="pk__name">Laptop</span>
          <span class="pk__kg">1.6 kg</span>
        </li>
        <li class="pk__row" data-row data-kg="1.1">
          <button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Camera, 1.1 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
          <span class="pk__name">Camera</span>
          <span class="pk__kg">1.1 kg</span>
        </li>
        <li class="pk__row" data-row data-kg="0.9">
          <button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Jacket, 0.9 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
          <span class="pk__name">Jacket</span>
          <span class="pk__kg">0.9 kg</span>
        </li>
        <li class="pk__row" data-row data-kg="1.4">
          <button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Boots, 1.4 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
          <span class="pk__name">Boots</span>
          <span class="pk__kg">1.4 kg</span>
        </li>
        <li class="pk__row" data-row data-kg="0.8">
          <button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Books, 0.8 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
          <span class="pk__name">Books</span>
          <span class="pk__kg">0.8 kg</span>
        </li>
      </ul>
      <span class="pk__say" data-say aria-live="polite"></span>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </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.

29 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 “Packing list” 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 black, a dark card: at the top “Lisbon, 4 days” and “Cabin bag, 10 kg limit”, on the right the weight in large type, “5.5 kg”. Below, a blue bar with a white notch marking the limit, and the line “4.5 kg to spare”. Then five rows to tick: Laptop, Camera, Jacket, Boots, Books, each with its weight. On every tick the box fills on a spring, the tick draws itself, the row lights up, “+1.6” shows for a moment beside the figure and the weight rolls while the bar advances; the line below updates, “900 g to spare”. With the boots the bar passes the notch: figure, bar, line and the card’s glow turn red, the bar jolts and “0.5 kg over” appears. Take the boots out and everything goes blue again, and with the books you land on “100 g to spare”.

How it works

The real weight and the shown one

The real weight is the sum of the ticked rows plus BASE; the shown one is a number a tween takes towards the real one, and figure and bar are drawn from it.

The bar and the notch

The bar is as long as the limit plus a fifth, so the overweight has room to show; the notch sits at the limit.

Past the limit

A class on the card changes a single CSS variable and with it bar, figure, line and glow; on first crossing the bar gives an elastic jolt.

The tick

The fill scales on a spring, the tick draws itself with the dashoffset and beside the figure a “+1.6” rises and fades.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#4f9bffThe colour of the ticks and of the bar while the weight is within the limit.
OVERscript.js#ff5c50The colour used when the bag goes over the limit.
LIMITscript.js10The bag’s weight limit, in kilos.
BASEscript.js5.5How much the bag weighs before adding the things in the list, in kilos.
SPRINGscript.js1How much the ticks and the bar bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer fills the bag until it is over the limit, then takes out and swaps.

Try them in the Playground

When to use it

In a travel or airline app, next to the booking; and wherever a list has a ceiling not to exceed: a shopping budget, a meal’s calories, a van’s room, the hours of a day.

On phones

The same card, 292 pixels wide at most: the rows are 36 pixels tall and the whole row is the target, the large weight stays at the top right and everything fits a short screen.

With reduced motion

The ticks appear at once, the figure and the bar go to the new value without rolling and the red arrives without the jolt. The demo does not move by itself.

Pitfalls

  • The weights are made up: in a real app the traveller types them or they come from a list of objects, and the limit from the flight’s fare.
  • The overweight is not told by red alone: the line under the bar writes it in kilos, and a hidden aria-live line says it at every tick.
  • Under a kilo the room left is written in grams, rounded to the hundred: “100 g to spare” reads better than “0.1 kg”.
  • The boxes are buttons with role=checkbox; the click works on the whole row, Space and Enter on the box.
  • Decimals add up badly (0.1 + 0.2): the comparison with the limit has a small tolerance.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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