
The elastic button
Buttons, Hover, Text
The kitchen requests field of a restaurant, when you book a table or order a takeaway, on black: a dark card with a fine grain and a 1px edge that catches an orange light where the pointer is; under the field four smoked-glass quick chips, No onions, Sauce on the side, Nut allergy, Birthday candle. Tap a chip and its words lift off, fly in a small arc to the end of the note and land letter by letter, with an orange tint growing underneath, while a sheen crosses the chip and the field warms up from the bottom as the note fills. Tap it again and its letters drop away from the end while the rest of the note slides over to close the gap. Type the same words by hand and the chip lights up on its own.
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>
<!--
"Kitchen requests field" 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 kitchen requests field with the chips that slide into the text</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" data-stage>
<!-- the requests field of a table booking or an order: a tapped chip slides its words into the note,
tapped again its words drop out and the rest of the note closes the gap -->
<section class="card" data-card aria-label="Requests for the kitchen">
<div class="head">
<label class="head__label" for="note"><svg class="head__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 1.8h8v12.4l-2-1.3-2 1.3-2-1.3-2 1.3z"/><path d="M6.2 5.4h3.6M6.2 8.2h2.4"/></svg>Requests for the kitchen</label>
<span class="head__opt">Optional</span>
</div>
<div class="box" data-box>
<div class="box__scroll" data-scroll aria-hidden="true">
<div class="box__tints" data-tints></div>
<div class="box__mirror" data-mirror></div>
<span class="box__caret" data-caret></span>
</div>
<textarea class="box__input" id="note" data-input rows="4" spellcheck="false"
placeholder="Allergies, swaps, a birthday"></textarea>
</div>
<div class="chips" data-chips role="group" aria-label="Quick requests"></div>
<div class="foot">
<span class="foot__hint">Printed on the kitchen ticket</span>
<span class="foot__count" data-count><span data-countnum>0</span>/<span data-countmax>140</span></span>
</div>
</section>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2v15.6l4.3-4.1 2.7 6.1 2.6-1.1-2.7-6h5.9z"/>
</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.
24 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 “Kitchen requests field” from Animorio and fit it into my siteThe real field is a textarea with transparent text and an orange caret; behind it, with the same type, the same line height and the same wrapping (pre-wrap), an element redraws the note with each letter in an inline-block span. The letters of a word sit in a per-word span that never splits, and spaces stay plain text: so the text behind wraps at the same points as the textarea and every letter can move on its own.
For each chip a regular expression looks for its words in the note, case-insensitively and only as whole words. The requests found decide the letters' colour, the tints under the text and the state of the chips: that's why a request typed by hand lights its chip and a deleted one turns it off.
The new text is written straight away into the textarea and the text behind, with the new letters invisible, and the first one is measured. A copy of the words leaves the chip's label and gets there with x on power3 and y on back, which gives it a small arc, growing from 13 to 14.5 pixels; just before it lands the real letters come in staggered on a back and the copy fades. The tints are rectangles measured line by line with offsetLeft and offsetTop, which transforms don't affect.
Before a request is removed every letter's position is stored, then its letters drop away from the end. With the text redrawn without it, each remaining letter finds its old position by shifting its index and moves from there to the new one (FLIP), across lines too; the comma that separated it goes with it and the word that becomes first takes the capital.
A GSAP timeline takes a drawn pointer to the four chips, then back to the first to remove it, blinks a fake caret at the end of the note and finally empties it and starts again. On the first real tap, keystroke or focus on the field it stops for good.
| Name | File | Default | What it changes |
|---|---|---|---|
REQUESTS | script.js | ["No onions", "Sauce on the side", "Nut allergy", "Birthday candle"] | The quick requests, one per chip. |
MAX_LENGTH | script.js | 140 | The most letters the note can hold. |
FLY_TIME | script.js | 0.6 | How long the words take to fly from the chip to the field, in seconds. |
LETTER_STAGGER | script.js | 0.018 | The delay between one letter and the next as they come in or drop out. |
SPRING | script.js | 1.6 | How much the letters and the chip bounce: 0 none, 3 a lot. |
ACCENT | script.js | #c2410c | The colour of the requests, the active field and the full counter. |
In a table booking form, in the basket of a takeaway or delivery order, in the room requests of a hotel: wherever people want to tell the kitchen or the staff something but usually write the same few things. The chips save typing on a phone, and the text stays free and editable.
The card is at most as wide as the screen minus the margins and a little under 300 pixels tall; the field is at most 112 pixels tall and shrinks with 24% of the height, and the chips wrap on their own. On a phone the chips are 30 pixels tall, big enough for a finger, and a long note scrolls inside the field with the text behind following it.
No movement: the words don't fly and the letters neither drop nor slide, the request fades in and out, the tints arrive without growing, the chip's x is already turned, the sheen doesn't pass, the light on the edge stays still at the top left and the drawn pointer is hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.3 KB; the libraries: GSAP 28 KB.
Tested on 1 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.