
The star rating
Ratings, SVG, Hover
The «Start a return» button of a made-up clothing shop, Norrland Supply. On tap the top edge of the pill opens like the slot of a label printer and a thermal paper shipping label feeds out of it, row by row in small jolts: the shop, the return address, a QR code made of little squares, the return number and a barcode. The paper curls back a little, then it is cut, springs free and lies down tilted with its shadow; the button says «Label ready, drop off by 12 Nov» with a tick that draws itself, and the refund appears underneath.
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>
<!--
"Start a return button" 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 Start a return button that prints the shipping label</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 Start a return button of a made-up clothing shop. On tap the top of the pill opens like the slot of a
label printer and a paper shipping label feeds out of it row by row; then it is cut, springs free and lies
down tilted, while the pill says the label is ready and the refund waits underneath -->
<div class="ret" data-ret>
<div class="feed" data-feed>
<span class="feed__shadow" data-lshadow aria-hidden="true"></span>
<div class="label" data-label aria-hidden="true">
<div class="paper" data-paper>
<span class="paper__grain"></span>
<div class="row row--head" data-row>
<span class="lab__brand">Norrland Supply</span>
<span class="lab__tag">Return</span>
</div>
<span class="rule rule--thick" data-row></span>
<div class="row row--to" data-row>
<span class="lab__small">Return to</span>
<span class="lab__addr lab__addr--name">Norrland Supply Returns</span>
</div>
<div class="row" data-row><span class="lab__addr">Dock 3, Hamnvagen 18</span></div>
<div class="row" data-row><span class="lab__addr">417 64 Gothenburg, Sweden</span></div>
<span class="rule rule--dash" data-row></span>
<div class="row row--mid" data-row>
<svg class="qr" data-qr viewBox="0 0 25 25" shape-rendering="crispEdges"></svg>
<div class="mid">
<span class="lab__small">Return no.</span>
<span class="lab__rma" data-rma>NS-4471-208</span>
<span class="lab__line">1 item, Merino overshirt M</span>
<span class="lab__line">Prepaid, 0.8 kg</span>
</div>
</div>
<span class="rule" data-row></span>
<div class="row row--bars" data-row data-bars-row>
<svg class="bars" data-bars preserveAspectRatio="none" shape-rendering="crispEdges"></svg>
</div>
<div class="row row--digits" data-row><span class="lab__digits" data-digits>4 471208 309157</span></div>
<span class="paper__curl" data-curl></span>
</div>
</div>
</div>
<span class="slot" data-slot aria-hidden="true">
<span class="slot__head" data-head></span>
</span>
<span class="warm" data-warm aria-hidden="true"></span>
<button class="pill" type="button" data-pill aria-label="Start a return for your order from Norrland Supply">
<span class="pill__skin" aria-hidden="true">
<span class="pill__grain"></span>
<span class="pill__edge"></span>
</span>
<span class="face rest" data-rest aria-hidden="true">
<svg class="rest__icon" viewBox="0 0 24 24" data-rest-icon>
<path class="rest__box" d="M4.5 8.2 12 4.4l7.5 3.8v7.6L12 19.6l-7.5-3.8z"/>
<path class="rest__seam" d="M4.5 8.2 12 12l7.5-3.8M12 12v7.6"/>
<path class="rest__back" data-rest-back d="M8.6 6.3 6.2 3.9M6.2 3.9h3.3M6.2 3.9v3.3"/>
</svg>
<span class="rest__words" data-rest-words>Start a return</span>
</span>
<span class="face busy" data-busy aria-hidden="true">
<span class="busy__words">Printing label</span>
<span class="busy__pct" data-pct>0%</span>
</span>
<span class="face done" data-done aria-hidden="true">
<svg class="done__tick" viewBox="0 0 24 24">
<circle data-tick-ring cx="12" cy="12" r="10.2" pathLength="1"/>
<path data-tick d="M7.6 12.3l3 3 5.8-6.2" pathLength="1"/>
</svg>
<span class="done__text">
<span class="done__top" data-done-top>Label ready</span>
<span class="done__sub" data-done-sub>Drop off by 12 Nov</span>
</span>
</span>
</button>
<p class="refund" data-refund aria-hidden="true">
<svg class="refund__icon" viewBox="0 0 16 16"><path d="M3 6.2h8.4a2.6 2.6 0 0 1 0 5.2H8.2M5.6 3.6 3 6.2l2.6 2.6"/></svg>
<span>Refund <b class="refund__sum" data-sum>€64.00</b> once scanned</span>
</p>
</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.
36 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 “Start a return button” from Animorio and fit it into my siteThe label sits in a box as tall as it plus a margin, with clip-path: inset(-400px -400px 0 -400px): it only cuts the bottom edge, which is exactly the slot above the pill. Moved down by its whole height it is hidden; rising, it comes out of the slot as from a printer.
On load and on every resize the script reads where each printed row ends (offsetTop plus offsetHeight over the label's height) and turns those into the stops of the feed; the barcode gets three. The timeline goes from stop to stop with a short power2.out and a 50 to 100 ms pause, and the head flares again on every jolt.
The label is a container: type, margins, QR and barcode are sized in cqw, a share of its width. The script only picks the width (and shrinks it if the window is not tall enough) and the whole label scales with it.
A generator with a fixed seed fills a 25 by 25 grid and lays the three corner squares, the timing lines and the alignment square on top; the barcode alternates bars and spaces from one to three units between the guards. Each is a single SVG path with shape-rendering crispEdges.
The curl is a rotateX around the bottom edge, with perspective, growing with the paper that is out, and a veil of shade at the top that follows it. At the cut the box stops clipping, the label jumps with a back.out(1.8), the curl goes back to zero with an elastic.out and a second back.out lays it down tilted while the blurred shadow comes in underneath.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | '#ff6a2b' | The colour of the print head, the arrow and the tick. |
REFUND | script.js | '€64.00' | The refund written under the button. |
DROP_OFF | script.js | '12 Nov' | The last day to drop the parcel off. |
CURL | script.js | 1 | How much the paper curls back coming out: 0 flat, 2 double. |
TILT | script.js | -4 | How tilted the label lies, in degrees. |
SPEED | script.js | 1 | 2 is twice as fast, 0.5 half as fast. |
HOLD | script.js | 2.6 | How many seconds the label stays before the button is ready again. |
AUTO | script.js | true | The printing plays by itself until someone touches the button. |
On the orders page of an online shop for clothes, shoes or furniture, in the returns centre, behind the confirmation email that leads to the return: anywhere starting a return should feel simple and already done.
The same pill, 60 pixels tall and almost as wide as the screen, and the same label, which shrinks all together if the height is not enough. A tap starts the printing and another tap on Label ready makes the button ready again; the slot that peeks with the pointer is not there on a phone.
No slot, no jolts, no springs: the label fades in already printed and lying down, the button's words and the refund line change with a fade, the tick already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.8 KB; the libraries: GSAP 28 KB.
Tested on 5 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.
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.