Skip to content
animorio
IT
All components

Send to kitchen button

Buttons, Hover, PhysicsGSAP, CSS onlyMediumCompressed weight: Demo 8.3 KBGSAP 28 KBFreeDownload the zip

The Send to kitchen button of the floor app of a made-up osteria, Osteria Lume: the waiter fires table 12’s order to the kitchen. On the tap the paper ticket comes out of the pill’s icon, grows and is caught by the steel rail above it, as in real kitchens; then it slides along the rail to the pass, swinging at every start and stop, and the pill fills with tomato red right under it. On arrival the ticket knocks the end stop with a pixel of bounce, the pill swells, a check draws itself and the label becomes In the kitchen · 14 min. Another tap recalls the ticket into the pill.

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>
<!--
  "Send to kitchen 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>The Send to kitchen button with the order ticket that slides along the rail</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">
    <!-- one gesture: fire the table's order. Pressed, the ticket lifts out of the pill and is caught by the
         steel ticket rail above it; it slides along the rail to the pass, filling the pill as it goes, and clips
         onto the end stop with a flutter: the kitchen has it -->
    <div class="frame" data-wrap>
      <div class="rail" data-rail aria-hidden="true">
        <span class="rail__bar" data-railbar></span>
        <span class="rail__stop rail__stop--l"></span>
        <span class="rail__stop rail__stop--r" data-stop></span>
      </div>

      <div class="ticket" data-ticket aria-hidden="true">
        <div class="ticket__in" data-tin>
          <svg viewBox="0 0 60 76" class="ticket__svg">
            <defs>
              <linearGradient id="k-paper" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stop-color="#fffdf8"/>
                <stop offset="0.7" stop-color="#f8f3e9"/>
                <stop offset="1" stop-color="#efe7d8"/>
              </linearGradient>
            </defs>
            <path class="ticket__paper" d="M0 0H60V70L57 73 54 70 51 73 48 70 45 73 42 70 39 73 36 70 33 73 30 70 27 73 24 70 21 73 18 70 15 73 12 70 9 73 6 70 3 73 0 70Z"/>
            <path class="ticket__crease" d="M0 4.5H60"/>
            <text class="t-table" x="5" y="14.5">TABLE <tspan data-ttable>12</tspan></text>
            <text class="t-time" x="55" y="14.5" text-anchor="end" data-ttime>19:28</text>
            <path class="ticket__rule" d="M5 19H55"/>
            <text class="t-item" x="5" y="28"><tspan class="t-q">2</tspan> Cacio e pepe</text>
            <text class="t-item" x="5" y="36.5"><tspan class="t-q">1</tspan> Burrata</text>
            <text class="t-item" x="5" y="45"><tspan class="t-q">1</tspan> Tagliata, rare</text>
            <text class="t-note" x="5" y="53">no nuts, seat 3</text>
            <path class="ticket__rule" d="M5 58H55"/>
            <text class="t-house" x="30" y="65.5" text-anchor="middle">OSTERIA LUME</text>
          </svg>
        </div>
      </div>

      <button class="c" type="button" data-btn data-autoclic aria-describedby="c-note">
        <span class="c__skin" data-skin aria-hidden="true">
          <span class="c__glow" data-glow></span>
          <span class="c__fill" data-fill></span>
          <span class="c__edge" data-edge></span>
          <span class="c__sheen" data-sheen></span>
        </span>
        <span class="c__icon" aria-hidden="true">
          <svg viewBox="0 0 24 24" class="c__glyph" data-glyph>
            <path d="M6.5 3.8h11v15.4l-1.4-1.1-1.4 1.1-1.4-1.1-1.3 1.1-1.4-1.1-1.4 1.1-1.3-1.1-1.4 1.1Z"/>
            <path class="g__line" d="M9.3 8.3h5.4M9.3 11.4h5.4M9.3 14.4h3"/>
          </svg>
          <svg viewBox="0 0 24 24" class="c__check" data-checksvg>
            <path data-check d="M6.2 12.6l3.7 3.6 7.9-8.4"/>
          </svg>
        </span>
        <span class="c__labels" data-labels>
          <span class="c__label" data-l="idle">Send to kitchen</span>
          <span class="c__label" data-l="wait">Sending to kitchen</span>
          <span class="c__label" data-l="done">In the kitchen<span class="c__sep">·</span><span class="c__eta"><span data-mins>14</span>&nbsp;min</span></span>
        </span>
      </button>

      <p class="note" id="c-note" aria-live="polite">
        <span class="note__t" data-n="idle">Table <span data-ntable>12</span> · 4 items · €58.00</span>
        <span class="note__t" data-n="done">Fired 19:28 · Chef Marta is on it</span>
      </p>
    </div>
  </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.

34 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 “Send to kitchen button” 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

On a white ground sits the black Send to kitchen pill with a line-drawn order ticket icon, a dim steel rail above it and below it the grey line Table 12 · 4 items · €58.00. On hover a warm light follows the pointer, the label widens on the wdth axis and the pill swells with a bounce while the icon lifts and tilts; pressed, the pill squashes slightly. On the tap the rail lights up, a gleam runs along it and the two stops click in at its ends; the paper ticket, with Table 12, the time, the dishes with their counts in red, the no nuts note and the jagged edge, comes out of the icon growing and is caught by the rail on the left with a small jolt. The icon window closes, the label rolls to Sending to kitchen and the ticket slides right, swinging as it starts and brakes, while tomato red fills the pill right under it with a light on the advancing edge. At the right stop the ticket knocks with a pixel of bounce, the stop gives a little, the pill swells a hair and a light crosses it; a check draws itself, the label becomes In the kitchen · 14 min and below it Fired 19:28 · Chef Marta is on it. Brushing the pointer across the pill makes the ticket sway. Another tap recalls it into the icon, the red leaves to the right and the rail dims.

How it works

The ticket that comes out of the icon

The ticket is an SVG with the jagged-edged paper, the dishes and the note. Before the flight the script measures the centre of the icon in the pill against the ticket’s place on the rail, and a fromTo brings it from there, at 30% of its size, to the start of the rail.

The pendulum hanging from the rail

An outer element gets x, y and scale from GSAP; the inner one only the rotation of a damped pendulum integrated in the ticker, pushed by the rail’s acceleration worked out from position differences between frames. A touch of skewY the other way makes the paper look like it bends.

The red under the ticket

The fill does not follow time but the ticket: on every frame the ticket’s centre on screen is read and turned into a fraction of the pill, which becomes the red’s inset clip-path. So the red’s edge and its light always sit under the paper, at any width.

The elastic pill

Like the site’s pills: on hover the label moves on the wdth axis from 100 to 112 and the background, a separate layer, grows on a bouncing curve; the label width is measured at its widest, after the font has arrived, so nothing around it moves.

Values to change

NameFileDefaultWhat it changes
TABLEscript.js12The table number, on the ticket and in the line below.
MINUTESscript.js14The minutes the kitchen quotes for the table.
WAITscript.js1.2The seconds the ticket slides along the rail.
SWAYscript.js1How much the hanging ticket bends and swings.
BOUNCEscript.js1.5How much the pill and the label bounce.
STRETCHscript.js112How much the label widens on the wdth axis on hover.
--pomodorostyle.css#c2412bThe red that fills the pill.
--acciaiostyle.css#b9bcc2The steel of the rail.

Try them in the Playground

When to use it

In the floor app or point of sale of a restaurant, trattoria or bar, to fire a table’s order to the kitchen; or on a restaurant site with QR ordering at the table, where guests see their ticket reach the pass.

On phones

The pill drops to 56 pixels and the label tightens by a point; the rail is sized on the screen width and the finger taps like the mouse. Without hover the light and the wide label stay off, the ticket still swings on the rail.

With reduced motion

No flight, slide or pendulum: the rail brightens with a fade, the ticket appears still at the pass, the red and the check fade in and the label changes without moving; on the way back everything fades out.

Pitfalls

  • The red tied to the tween’s time, with the same curve as the ticket, lagged half a pill behind: the rail and the pill have different widths. Now the ticket’s position on screen is read every frame.
  • The labels are centred with GSAP’s xPercent, not a translateX in the CSS: GSAP’s transform for y wiped the class’s and the labels slid right.
  • The label width must be measured with the wdth axis at its hover maximum, after the font arrives: measured at 100 the wide label was clipped.
  • The preview autopilot clicks every 2.8 seconds and closed In the kitchen as soon as it appeared: an untrusted click in the final state is skipped for the first 2.4 seconds.
  • With the icon window open, Sending to kitchen sat off to the right next to the hole the ticket left: the window closes during the trip and reopens with the check.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.3 KB; the libraries: GSAP 28 KB.

Testing

Tested on 16 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