
The star rating
Ratings, SVG, Hover
The button that sets a loaf aside for tomorrow in a bakery. On the right it says how many are left; pressed, the dough in the disc sinks for a moment, then rises, takes the colour of the crust and its cuts open; the tick draws itself and the tag says from when to pick it up.
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>
<!--
"Set aside a loaf 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>Set aside a loaf button of a bakery with the loaf that rises and the pickup time</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 button that sets a loaf aside for tomorrow in a bakery: pressed, the dough rises on the tray, takes the
colour of the crust and its cuts open, then a tick draws itself and the tag says from when to pick it up -->
<button class="bk" type="button" data-bk>
<span class="bk__body" aria-hidden="true"><span class="bk__wash" data-wash></span><span class="bk__light"></span></span>
<span class="bk__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-loaf>
<path class="seat__loaf" data-shape d="M4.800 17.400c0-5 3-8.800 7.200-8.800s7.200 3.800 7.200 8.800Z"></path>
<path class="seat__score" data-score pathLength="1" d="M8.300 14.800l1.900-3"></path>
<path class="seat__score" data-score pathLength="1" d="M11.200 15.200l1.900-3.600"></path>
<path class="seat__score" data-score pathLength="1" d="M14.200 14.800l1.800-2.800"></path>
</g>
<path class="seat__tray" d="M3.200 18.600h17.600"></path>
<path class="seat__tick" data-tick pathLength="1" d="M8.200 13.200 10.900 15.800 15.900 10.300"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Set aside a loaf</span></span>
<span class="label__sub"><span data-sub>Country sourdough</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-left>5 left</span></span>
</button>
<p class="sr" data-live aria-live="polite"></p>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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>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 “Set aside a loaf button” from Animorio and fit it into my siteA value from 0 to 1 does everything: the height (scaleY from 0.52 to 1 with the origin on the tray), the width that narrows slightly, the colour (gsap.utils.interpolate between dough and crust) and the three cuts, which draw themselves staggered past 0.45.
First the value goes down to minus 0.12 in 0.16 seconds, then up to 1 with back.out(1.6): the loaf passes its size and comes back, like something leavened. It is one of the few places where a spring on the value makes sense.
The loaf goes to 32% opacity, the tick draws itself in 0.36 seconds, the three texts roll staggered. With LEFT at zero the button says tomorrow is sold out and does not answer.
| Name | File | Default | What it changes |
|---|---|---|---|
BREAD | script.js | "Country sourdough" | The bread to set aside (made up). |
PICKUP | script.js | "7:30 am" | From when it can be picked up tomorrow (made up). |
LEFT | script.js | 5 | How many loaves are left to reserve. |
RISE | script.js | 1.1 | How many seconds the loaf takes to rise and brown. |
ACCENT | script.js | #d9953f | The colour of the crust. |
OK | script.js | #2f9d6a | The colour once the loaf is set aside. |
HOLD | script.js | 2.6 | Alone: how many seconds the confirmation stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
On the site of a bakery or a pastry shop that bakes limited batches, in a café selling tomorrow’s bread, in any shop where you reserve today what will be ready tomorrow.
The same pill, at most as wide as the screen minus the margins; there is no hover, the tap does the same job.
The loaf does not rise: it appears already baked with its cuts, the texts change without rolling and the tick appears.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 16 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.