
The liquid grid
Hover, Transitions
People searched for “barcode scanner” and found only words drawn as barcodes: here is the real scanner of a made-up grocery app, Larder, in a screen-shaped card on warm white. The viewfinder’s four thin corners search, tighten on a spring around the label of an abstract package, an orange line sweeps across the code and the bars light up one by one beneath it; the corners click inwards and the product card rises from the bottom, with the price rolling, three nutrition values as small bars and Add to list, which turns into Added while the list count goes up. On hover the values show the exact number. 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>
<!--
"Barcode scanner" 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>Barcode scanner</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 scanner of a made-up grocery app, Larder: the viewfinder looks for a code, locks on it with a spring,
a thin line reads the bars one by one, and the product card rises from the bottom -->
<section class="screen" data-screen aria-label="Larder barcode scanner">
<header class="bar">
<span class="brand"><svg viewBox="0 0 18 18" aria-hidden="true"><path d="M3.2 7.4h11.6l-1.3 7.2H4.5z"></path><path d="M6.4 7.4l1.4-4.1M11.6 7.4l-1.4-4.1"></path></svg>Larder</span>
<button class="listbtn" type="button" data-list aria-label="Shopping list">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5.6 4.6h7.2M5.6 8h7.2M5.6 11.4h7.2"></path><path d="M3 4.6h.2M3 8h.2M3 11.4h.2"></path></svg>
<span class="listbtn__txt">List</span>
<span class="count" data-count-wrap><span class="roll" data-count></span></span>
</button>
</header>
<div class="vf" data-vf>
<div class="vf__feed" aria-hidden="true"></div>
<div class="scene" data-scene>
<div class="pack" data-pack>
<div class="pack__drift" data-drift>
<span class="pack__seam" aria-hidden="true"></span>
<span class="pack__fold" aria-hidden="true"></span>
<div class="label" data-label>
<svg class="code" data-code viewBox="0 0 106 52" aria-hidden="true"></svg>
</div>
</div>
</div>
</div>
<div class="reticle" aria-hidden="true">
<span class="cn cn--tl" data-cn></span><span class="cn cn--tr" data-cn></span>
<span class="cn cn--bl" data-cn></span><span class="cn cn--br" data-cn></span>
<span class="beam" data-beam></span>
</div>
<p class="hint" data-hint><span data-hint-text>Point at a barcode</span></p>
</div>
<div class="sheet" data-sheet role="dialog" aria-label="Scanned product">
<button class="grab" type="button" data-grab aria-label="Scan next"><span></span></button>
<div class="prod">
<div class="prod__text" data-in>
<h2 class="prod__name" data-name>Oat milk, barista 1 L</h2>
<p class="prod__meta" data-meta>Northfield Oats · per 100 ml</p>
</div>
<span class="price"><span class="roll" data-price></span></span>
</div>
<ul class="nutri" data-nutri>
<li class="row" data-row><span class="row__k">Energy</span><span class="row__bar"><span data-fill></span></span><span class="row__v"><span class="row__word" data-word></span><span class="row__exact" data-exact></span></span></li>
<li class="row" data-row><span class="row__k">Sugars</span><span class="row__bar"><span data-fill></span></span><span class="row__v"><span class="row__word" data-word></span><span class="row__exact" data-exact></span></span></li>
<li class="row" data-row><span class="row__k">Protein</span><span class="row__bar"><span data-fill></span></span><span class="row__v"><span class="row__word" data-word></span><span class="row__exact" data-exact></span></span></li>
</ul>
<button class="add" type="button" data-add>
<span class="add__bg" data-add-bg aria-hidden="true"></span>
<svg class="add__ico" viewBox="0 0 16 16" aria-hidden="true"><path class="add__plus" data-plus d="M8 3.6v8.8M3.6 8h8.8"></path><path class="add__tick" data-tick d="M3.6 8.3l2.9 2.9 5.9-6.1" pathLength="1"></path></svg>
<span class="add__label" data-add-label>Add to list</span>
</button>
</div>
</section>
<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.
31 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 “Barcode scanner” from Animorio and fit it into my siteThe twelve made-up digits become a real EAN-13: the check digit is computed with weights 1 and 3, the first digit picks the L or G parity of the six on the left, those on the right use the R code. Adjacent 1 modules become a single rectangle in the svg, and the guard bars are longer.
The corners have no fixed position: every frame (gsap.ticker) works out the searching box, with the breathing and drifting made of slow sines, and the label’s box measured with getBoundingClientRect. A single number, lock, goes from 0 to 1 with back.out and blends the two: past 1 the corners go inside the label and come back.
The line is a single element, placed every frame on the svg at the scan fraction of its width. Each bar knows where its centre is; when the line passes it, it takes the accent and fades to black in just over half a second, so a trail stays behind the line.
The click is a five-pixel inset that returns with elastic.out: all four corners step in together. The card rises with yPercent from 105 to 0 and back.out, the viewfinder stage lifts and shrinks with it, the price rolls digit by digit and the bars fill with scaleX, staggered.
Every value has two overlapping labels, the word and the number: the is-exact class on the card swaps them with a fade and a six-pixel step. It switches on with hover where there is a pointer, and with a tap on the phone.
| Name | File | Default | What it changes |
|---|---|---|---|
PRODUCT_1 | script.js | Oat milk, barista 1 L | The first scanned product. |
PRICE_1 | script.js | 2.49 | Its price, in euros. |
PRODUCT_2 | script.js | Rye crispbread 250 g | The second scanned product. |
PRICE_2 | script.js | 3.19 | Its price, in euros. |
LIST_COUNT | script.js | 4 | How many things are already on the shopping list. |
SEARCH | script.js | 6 | How much the viewfinder corners move while searching. |
LOCK_SPRING | script.js | 1.6 | How far the viewfinder overshoots when it tightens on the code. |
SCAN_TIME | script.js | 0.95 | How long the line takes to cross the code. |
SHEET_TIME | script.js | 0.7 | How long the product card takes to rise. |
LOOP_PAUSE | script.js | 1.6 | The pause before the loop starts again. |
In a supermarket or grocery delivery app, in an app that reads labels and nutrition facts, in a warehouse or self-checkout, or on the page presenting an app whose camera recognises products.
The screen takes the width with a margin and the window height with min(), and the spacing follows the height with clamp; under 470 pixels of height the brand line hides, so with the card open it all fits the phone preview box. Viewfinder and label are measured every frame, so they follow a size change even mid-animation. Tapping the viewfinder scans or moves to the next one, tapping the values shows the exact numbers.
No springs, flights or wandering corners: the viewfinder is already tight on the code, the bars already lit and the product card already up, with price and bars in place; the exact numbers, Added and the next product arrive with a fade and the self-running loop does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.9 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.