Skip to content
animorio
IT
All components

Kitchen requests field

Forms, Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 9.3 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

In the middle, on black, a near-black card with rounded corners, a veil of grain, layered shadows and a 1px edge that lights up orange near the pointer: at the top Requests for the kitchen and on the right, in grey, Optional; below it a large text field sunk into the card with an inner shadow, with the grey hint Allergies, swaps, a birthday; under that four smoked-glass chips with a thin border and a drawn plus, No onions, Sauce on the side, Nut allergy, Birthday candle; at the bottom Printed on the kitchen ticket and the 0/140 counter. A drawn pointer taps No onions: the chip dips and springs back, its label fades while an orange copy flies in a small arc to the start of the field, growing to the size of the text; once there, the letters come in one after another, dropping a few pixels and settling, and an orange tint grows under them from the left. The field lights up with an orange halo and warms from the bottom, a white sheen crosses the chip, the chip's plus turns 45 degrees into an x, the chip tints and swells by a breath, the counter rolls to 9/140. The same with Sauce on the side, which comes in after a comma and in lower case, with Nut allergy and with Birthday candle, which wraps to the next line. Then the pointer taps No onions again: its letters drop away from the last to the first, the tint pulls back to the right, and every other letter of the note slides back to its new place, across lines too, with a little settle; the new first word takes the capital. Finally the note gently empties and the loop starts again.

How it works

The text behind the field

The 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.

Reading the requests in the text

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 flight

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.

Closing the gap

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.

The autopilot

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.

Values to change

NameFileDefaultWhat it changes
REQUESTSscript.js["No onions", "Sauce on the side", "Nut allergy", "Birthday candle"]The quick requests, one per chip.
MAX_LENGTHscript.js140The most letters the note can hold.
FLY_TIMEscript.js0.6How long the words take to fly from the chip to the field, in seconds.
LETTER_STAGGERscript.js0.018The delay between one letter and the next as they come in or drop out.
SPRINGscript.js1.6How much the letters and the chip bounce: 0 none, 3 a lot.
ACCENTscript.js#c2410cThe colour of the requests, the active field and the full counter.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • With one inline-block letter per character, the text behind wrapped mid-word where the textarea didn't: each word's letters sit in a span that never splits and spaces stay as text, so both wrap at the same points.
  • Tints measured with getBoundingClientRect during the FLIP ended up where the letters were at that moment, not where they settled: they are measured with offsetLeft and offsetTop, which ignore transforms.
  • Tapping two chips quickly made the second flight measure the text while the first was still changing it: a counter of running actions lets a tap through only when the text is still.

Libraries

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.

Testing

Tested on 1 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components