
The star rating
Ratings, SVG, Hover
The Get it by Christmas button of an online shop: a fir green pill with, inside on the right, a small ivory paper window where the dates sit on a drum (Dec 22, Dec 23, Dec 24). On hover the small line says how many days are left to the last day to order, Order in 4 days, and the drum gives half a turn. On click the days go back to today, Nov 19, then roll forward blurred to December 23; a thin cranberry ribbon runs down the window, a bow of two strokes draws itself on the date with a precise spring and the pill says Arrives Dec 23 with a drawn tick and the small Change pill, which takes it back to rest.
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>
<!--
"Christmas delivery 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>Christmas delivery button</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">
<!-- a "get it by Christmas" button: the days roll in the little date drum from today to the delivery day,
a thin ribbon runs down the drum and a bow ties itself on the date, and the pill says when it arrives -->
<button class="xm" type="button" data-xm data-autoclic>
<span class="xm__face" data-face>
<span class="xm__light" aria-hidden="true"></span>
<span class="xm__sheen" data-sheen aria-hidden="true"></span>
<svg class="xm__check" viewBox="0 0 16 16" aria-hidden="true"><path data-check pathLength="1" d="M3.4 8.6 6.5 11.5 12.7 4.7"></path></svg>
<span class="xm__text" data-text aria-hidden="true">
<span class="xm__line xm__line--a"><span data-a>Get it by Christmas</span></span>
<span class="xm__line xm__line--b"><span data-b>Free gift delivery</span></span>
</span>
<span class="xm__win" aria-hidden="true">
<span class="xm__paper">
<i class="xm__row"></i>
<span class="xm__drum" data-drum></span>
</span>
<svg class="xm__ribbon" viewBox="0 0 74 46" aria-hidden="true">
<rect class="rb__shade" data-shade x="14.2" y="0" width="1" height="46"></rect>
<rect class="rb__band" data-band x="13" y="0" width="2" height="46"></rect>
<g transform="translate(14 4) scale(1.2) translate(-14 0)">
<path class="rb__tail" data-tail-l pathLength="1" d="M13.6 0.6 10.4 8.6"></path>
<path class="rb__tail" data-tail-r pathLength="1" d="M14.4 0.6 17.6 8.6"></path>
<path class="rb__loop" data-loop-l pathLength="1" d="M14 0C10.4-5 5.6-5.6 5.5-2.2 5.4 0.8 9.8 1.1 14 0"></path>
<path class="rb__loop" data-loop-r pathLength="1" d="M14 0C17.6-5 22.4-5.6 22.5-2.2 22.6 0.8 18.2 1.1 14 0"></path>
<rect class="rb__knot" data-knot x="12.7" y="-1.3" width="2.6" height="2.6" rx="0.8"></rect>
</g>
</svg>
</span>
</span>
</button>
<p class="live" data-live aria-live="polite"></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.
16 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 “Christmas delivery button” from Animorio and fit it into my siteThe rows run from two days before today to two after the delivery, worked out with Date.UTC from the three dates in the values block. A single position p, a decimal number, says which row is in the middle: every frame each row is d = i − p rows away, turns by d × 40 degrees on a small cylinder (translate3d with the sine and cosine of the radius, then rotateX) and its opacity is 1 / (1 + (1.8 d)²). Beyond 2.3 rows it is hidden. A fade of the paper colour above and below and a slightly recessed band behind the middle row make the picker.
The drum's speed is measured between frames (rows a second) and becomes a blur filter on the drum, up to 1.3 pixels, which follows the speed with a small lag: the dates smear while they run and sharpen as they slow. When p does not change and the blur is gone, the drawing writes nothing.
A GSAP timeline takes p back to today in half a second (expo.inOut, the rewind), then forward to 0.09 rows past the delivery (power3.inOut, 1.45 seconds: one pixel too far) and back with elastic.out. The words roll up or down with yPercent and a hint of blur, and the pill bounces on a spring at the click. PACE changes the pace of everything with timeScale.
Ribbon and bow are an SVG over the window. The ribbon is a two pixel rectangle in the accent colour that grows with scaleY from the top, with a hairline of shadow a moment later: a dry mark, not a drawing. Loops and tails are strokes with pathLength="1", drawn with stroke-dashoffset. The bow sits in a group moved onto the window's edge, and inside it GSAP moves the pieces round the knot with svgOrigin: the knot pulls tight (scale 1.3 and back), the loops come out of the knot turning 26 degrees with an elastic.out set by SPRING, the tails drop on another spring. To untie, the right tail is pulled, the loops are wiped as they slip back and the ribbon goes up.
It is a real button: aria-busy while it works, an aria-label that changes (Get it by Christmas. Order in 4 days to get it on Dec 23. / Arrives Dec 23. Change delivery date.) and an aria-live region that says the date. The pressed state is a CSS scale on the child, the GSAP bounce on the button: one element for each. Keyboard focus shows a ring and does what the hover does. With no mouse, after the return the line shows Order in 4 days for a moment, so a tap sees it too.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #b8213d | The colour of the ribbon, the bow and the chosen date. |
PILL | script.js | #0f3a2b | The colour of the pill; the light at the top and the dark at the bottom come from it. |
LABEL | script.js | Get it by Christmas | The words at rest. |
NOTE | script.js | Free gift delivery | The small line under the words, at rest. |
TODAY | script.js | 2026-11-19 | Today (YYYY-MM-DD): the drum goes back here before it runs. |
DELIVERY | script.js | 2026-12-23 | The delivery day (YYYY-MM-DD): the drum stops here and the bow ties on it. At most 120 days after today. |
ORDER_BY | script.js | 2026-11-23 | The last day to order: on hover the line says how many days are left. |
PACE | script.js | 1 | The pace of everything: 2 takes twice as long, 0.5 half. |
SPRING | script.js | 1 | How lively the bow's spring is when it ties; 0 it opens with no bounce. |
On a product page or in the cart of an online shop in the holiday season, when it matters whether the gift arrives in time: Christmas, but also Valentine's Day, Mother's Day, a birthday. The dates are made up: in a real shop today, the delivery and the last day to order come from the server, and the click picks the shipping.
The same pill, at most 304 pixels wide and never wider than the screen; the date window keeps its size and long words are cut with an ellipsis. A tap presses and picks the date; Order in 4 days shows on its own for a moment after the return.
No run of the days, no bounces or springs: the drum fades out and comes back already on the 23rd, ribbon and bow fade in, the tick and the new words arrive without motion. On the return everything fades away.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.4 KB; the libraries: GSAP 28 KB.
Tested on 19 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.