
Button menu
Menus, Transitions, Text
The cake order form of an invented bakery, Halcyon Bakehouse, like a Dribbble shot: a warm white card with a real photo of a birthday cake with candles on top, and the choices below. How many people, 6, 8 or 10, on a pill control whose white handle slides and stretches while the cake in the photo grows a little; the flavour on three chips with a drawn tick; the words to put on the cake, which appear over the photo in raspberry script letter by letter as you type; the pick-up day on a strip of dates. The price at the bottom rolls on two drums at every choice with a small +$14 rising from it, and Place order fills with raspberry and becomes Ordered, pick up Sat 11:00 with the check drawing itself.
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>
<!--
"Cake order form" 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 cake order form with the choices that change the price</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/dancing-script@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- a small bakery's order form for a celebration cake: a real photo of the cake, how many it serves, the flavour,
the words piped on top (they appear on the photo as you type), the pick-up day and a price that rolls -->
<form class="order" data-order novalidate>
<figure class="order__photo" data-photo>
<span class="order__zoom" data-zoom>
<img class="order__img" data-img src="torta.webp" width="960" height="640" alt="A birthday cake with sprinkles and candles">
</span>
<span class="order__piping" data-piping aria-hidden="true"></span>
<figcaption class="order__shop">
<span class="order__shop-name">Halcyon Bakehouse</span>
<span class="order__shop-tag" data-serves>Serves 6</span>
</figcaption>
</figure>
<div class="order__body">
<header class="order__head">
<h1 class="order__title">Celebration cake</h1>
<p class="order__sub">Sponge, Swiss meringue buttercream, sprinkles</p>
</header>
<div class="row">
<span class="row__label" id="size-label">Serves</span>
<div class="seg" data-seg role="radiogroup" aria-labelledby="size-label">
<span class="seg__thumb" data-thumb aria-hidden="true"><span class="seg__thumb-face"></span></span>
<button class="seg__opt" type="button" role="radio" aria-checked="true" data-size="6">6</button>
<button class="seg__opt" type="button" role="radio" aria-checked="false" data-size="8">8</button>
<button class="seg__opt" type="button" role="radio" aria-checked="false" data-size="10">10</button>
</div>
</div>
<div class="flavours" role="radiogroup" aria-label="Flavour">
<button class="chip" type="button" role="radio" aria-checked="true" data-flavour="Vanilla" data-add="0">
<span class="chip__face">
<svg class="chip__tick" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.6 8.4l2.8 2.8 6-6.2" pathLength="1"/></svg>
<span class="chip__name">Vanilla</span>
</span>
</button>
<button class="chip" type="button" role="radio" aria-checked="false" data-flavour="Chocolate" data-add="0">
<span class="chip__face">
<svg class="chip__tick" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.6 8.4l2.8 2.8 6-6.2" pathLength="1"/></svg>
<span class="chip__name">Chocolate</span>
</span>
</button>
<button class="chip" type="button" role="radio" aria-checked="false" data-flavour="Raspberry" data-add="4">
<span class="chip__face">
<svg class="chip__tick" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.6 8.4l2.8 2.8 6-6.2" pathLength="1"/></svg>
<span class="chip__name">Raspberry</span>
<span class="chip__add">+$4</span>
</span>
</button>
</div>
<label class="words" data-words>
<svg class="words__pen" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 13l.6-2.6 7.2-7.2a1.4 1.4 0 0 1 2 2l-7.2 7.2z"/><path d="M9.6 4.4l2 2"/></svg>
<span class="sr">Words on the cake</span>
<input class="words__field" data-field type="text" maxlength="24" placeholder="Words on the cake" autocomplete="off">
<span class="words__price" data-words-price>+$3</span>
</label>
<div class="days">
<div class="days__head">
<span id="day-label">Pick up</span>
<span class="days__time">11:00 · 4 Elm Row</span>
</div>
<div class="days__strip" data-days role="radiogroup" aria-labelledby="day-label">
<span class="days__thumb" data-day-thumb aria-hidden="true"></span>
<button class="day" type="button" role="radio" aria-checked="false" data-day="Thu"><span class="day__w">Thu</span><span class="day__n">12</span></button>
<button class="day" type="button" role="radio" aria-checked="false" data-day="Fri"><span class="day__w">Fri</span><span class="day__n">13</span></button>
<button class="day" type="button" role="radio" aria-checked="false" data-day="Sat"><span class="day__w">Sat</span><span class="day__n">14</span></button>
<button class="day" type="button" role="radio" aria-checked="false" data-day="Sun"><span class="day__w">Sun</span><span class="day__n">15</span></button>
<button class="day" type="button" role="radio" aria-checked="false" data-day="Mon" disabled><span class="day__w">Mon</span><span class="day__n">16</span></button>
</div>
</div>
<div class="foot">
<div class="price" aria-hidden="true">
<span class="price__cur">$</span>
<span class="price__digits" data-digits></span>
<span class="price__delta" data-delta></span>
</div>
<button class="place" type="submit" data-place>
<span class="place__face" data-place-face>
<span class="place__fill" data-place-fill aria-hidden="true"></span>
<span class="place__state place__state--rest" data-rest>
<span>Place order</span>
<svg class="place__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.2L12.3 8 8.5 11.8"/></svg>
</span>
<span class="place__state place__state--done" data-done aria-hidden="true">
<svg class="place__check" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.4 8.4l3 3 6.2-6.6" pathLength="1" data-check/></svg>
<span data-done-text>Ordered, pick up Sat 11:00</span>
</span>
</span>
</button>
</div>
</div>
</form>
<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.
45 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 “Cake order form” from Animorio and fit it into my siteUnder the size pills and under the days sits an absolute handle that GSAP moves with x and width to the chosen button's offsetLeft and offsetWidth, on a back.out. The handle's face is a separate element that stretches while it travels (scaleX 1.14, scaleY 0.9) and comes back round with an elastic.out. A ResizeObserver puts the handles back in place when the card changes width.
The price is made of three windows one line tall with a soft mask above and below, each holding a column from 0 to 9: to change a digit the column slides by yPercent on a back.out, ones first and tens a beat later like a real counter. The hundreds window has zero width while the price stays under 100. At every change a small +$14 or −$14 rises next to the price and fades.
At every input the new text is compared with the letters already on the photo: the matching start stays, extra letters fade upwards, new ones are born in a span each from scale 1.35 and 3 px of blur to 1 and 0 on a strong back.out, like freshly piped icing settling. The face is variable Dancing Script, in raspberry with a white halo to lift it off the photo's wall.
The cake in the photo sits in a wrapper that GSAP scales from 0.95 to 1.05 with the size on a spring, anchored at the bottom, and the Serves label changes with a small vertical flip. In the chips the tick lives in a box 0 wide that opens to 14 pixels, so the word moves over to make room, and the stroke draws itself with pathLength=1 and stroke-dashoffset.
Under the button's words a raspberry fill grows with scaleX like a loading bar, then the two labels swap vertically and the check draws itself. A repeating GSAP timeline makes the hand's moves: the biggest size then SIZE, the flavour, the words WORDS at TYPE_SPEED letters a second, a day before and then PICKUP_DAY, orders, waits HOLD seconds and empties everything. On the first touch or key the pilot stops.
| Name | File | Default | What it changes |
|---|---|---|---|
WORDS | script.js | Happy 30th, Lea | The words on the cake (24 letters at most). |
SIZE | script.js | 8 | How many the form chooses the cake for: 6, 8 or 10. |
PICKUP_DAY | script.js | Sat | The pick-up day it chooses: Thu, Fri, Sat or Sun. |
BASE_PRICE | script.js | 48 | The price of the cake for 6, in dollars. |
SIZE_STEP | script.js | 14 | How much each bigger size adds. |
TYPE_SPEED | script.js | 11 | How many letters a second the words write. |
HOLD | script.js | 2.6 | How many seconds it stays on Ordered before starting again. |
AUTO | script.js | true | The form fills itself in until someone touches it. |
For a pastry shop, a bakery, an ice cream parlour or a café taking custom cake orders, and for any online shop where choices change the price: a frame, a print, a bouquet, a product to personalise. The rolling price and the rising +$ show at once what each choice costs, and the words appearing on the photo show the result before paying.
On the phone the card is 92% of the screen wide, the photo, title, controls and button get shorter with the screen's height and the ingredients line goes on short screens. The handles measure themselves again on the new width, the words on the cake get smaller with the photo. The rest is the same.
Nothing moves: the handles appear already in place, the cake changes size with no spring, the price digits change in place and the +$ fades in, the letters on the photo fade in, the ticks are already drawn, the button turns raspberry and the labels swap with a fade; the photo stays still.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0, Dancing Script (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 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.