Skip to content
animorio
IT
Back to the library

Café till screen

Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The till screen of a made-up coffee shop, Fennwick Coffee, on a tablet: on the left the grid of written items, Flat white, Oat latte, Cold brew, Croissant; on the right the order ticket. Tap a tile, it squeezes and a small +1 curves over to the ticket, where the line springs in, the quantity climbs to ×2 and the total rolls digit by digit. Then Charge, Cash, tap the 20 dollar note received and the change due appears big and rolls; New order closes the ticket by rolling it up, “Order 214 complete” with a tick, and the till is empty again for the next customer. Born from the search “cashier”, which only found a button. Minimal interface style.

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>
<!--
  "Café till screen" 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>Caf&eacute; till screen</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 till screen of a made-up coffee shop: tap an item and a +1 flies into the order, Charge, Cash,
         tap the note the customer gave and the change due rolls up big, then the order closes for the next customer -->
    <section class="till" data-till aria-label="Point of sale">
      <header class="bar">
        <span class="bar__mark"><svg viewBox="0 0 18 18" aria-hidden="true"><path d="M3.6 7.2h9v3.4a4.5 4.5 0 0 1-9 0z"></path><path d="M12.6 8.2h.9a1.9 1.9 0 0 1 0 3.8h-1.2"></path><path d="M6.4 2.6c-.5.8.5 1.3 0 2.2M9.4 2.6c-.5.8.5 1.3 0 2.2"></path></svg><span data-cafe>Fennwick Coffee</span></span>
        <span class="bar__order">Order <span class="bar__no" data-order-no>214</span></span>
        <span class="bar__till">Till 2 <span class="bar__sep" aria-hidden="true"></span> 11:31</span>
      </header>

      <div class="body">
        <div class="menu" data-menu aria-label="Menu"></div>

        <aside class="ticket" data-ticket aria-label="Order">
          <div class="ticket__paper" data-paper>
            <div class="view view--order" data-view-order>
              <div class="ticket__head">
                <span class="ticket__title">Current order</span>
                <span class="ticket__count"><span data-count>0</span> items</span>
              </div>
              <div class="lines" data-lines>
                <p class="empty" data-empty>Tap an item to start</p>
              </div>
              <div class="sum">
                <span class="sum__label">Total</span>
                <span class="roll sum__val" data-total></span>
              </div>
              <button class="cta" type="button" data-charge disabled>
                <span class="cta__bg" aria-hidden="true"></span>
                <span class="cta__label">Charge</span>
                <span class="roll cta__amt" data-charge-amt></span>
              </button>
            </div>

            <div class="view view--pay" data-view-pay aria-hidden="true">
              <div class="pay__head">
                <button class="back" type="button" data-back><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M7.4 2.8L4.2 6l3.2 3.2"></path></svg>Order</button>
                <span class="pay__due">Due <b data-due>$0.00</b></span>
              </div>
              <div class="seg" role="radiogroup" aria-label="Payment method">
                <span class="seg__pill" data-seg-pill aria-hidden="true"></span>
                <button class="seg__opt" type="button" role="radio" aria-checked="false" data-method="cash"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.8" y="4.2" width="12.4" height="7.6" rx="1.4"></rect><circle cx="8" cy="8" r="1.7"></circle></svg>Cash</button>
                <button class="seg__opt" type="button" role="radio" aria-checked="false" data-method="card"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.8" y="3.6" width="12.4" height="8.8" rx="1.6"></rect><path d="M1.8 6.6h12.4M4.2 10h2.6"></path></svg>Card</button>
              </div>
              <div class="bills" data-bills></div>
              <div class="change" data-change-box>
                <span class="change__label" data-change-label>Change due</span>
                <span class="roll change__val" data-change></span>
                <span class="change__sub" data-change-sub>Tap the cash received</span>
              </div>
              <button class="cta" type="button" data-done disabled>
                <span class="cta__bg" aria-hidden="true"></span>
                <span class="cta__label">New order</span>
              </button>
            </div>
          </div>

          <div class="closed" data-closed aria-hidden="true">
            <svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10.2"></circle><path d="M7.6 12.3l3 3 5.9-6.2" pathLength="1" data-closed-tick></path></svg>
            <span data-closed-text>Order 214 complete</span>
          </div>
        </aside>
      </div>
    </section>
    <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>

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.

41 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Café till screen” 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 warm white background, a tablet screen with a thin bezel and a thread of light at the top. At the top the till bar: the line-drawn cup of Fennwick Coffee, a made-up café, “Order 214” and “Till 2 · 11:31”. On the left nine cream tiles, each with its category in small type (Coffee, Bakery, Tea), the name and the price: on hover they lift with a shadow and the name widens, on tap they squeeze and spring back. From the tapped one a terracotta +1 rises and curves down, tilting, to the ticket line on the right: if the item is new the line opens on a spring and slides in from the right, if it is already there the quantity climbs from ×1 to ×2 with a hop, the line’s background lights up faintly and fades, the tile gets a ×2 badge and a thin ring, and the total and the Charge button roll digit by digit (each digit takes its own width, and the tens appear by widening). Charge leads to payment: the view slides sideways, the Cash and Card selector with the white cushion that glides, three abstract drawn notes (a rectangle with a frame, the figure and an engraved pattern) of 20, 50 and 100 dollars. Tap the 20 and the note lifts with a terracotta edge, the others dim and the change due appears big, $1.75, rolling, with “Cash $20.00 · Total $18.25” below. New order rolls the ticket up, “Order 214 complete” appears with the ring and a tick drawing itself, then the till is empty again, “Tap an item to start”, and the order number rolls to 215. With Card, instead, “Waiting for the reader” turns into “Approved”.

How it works

The +1 that curves over

On tap the tile and the quantity box in the line (already at its final height) are measured with getBoundingClientRect, a pill is created in the screen and carried along a quadratic Bézier curve computed each frame, with the control point ARC pixels higher. On arrival it vanishes and the line hops.

The line that springs in

The new line is added, its height measured and taken from 0 to that height with back.out; its content slides in from the right when the +1 lands. When done the height goes back to auto, so a window that changes size does not cut it.

Rolling digits, each its own width

Every digit is a column from 0 to 9 in a window one line tall: GSAP takes it to yPercent −10 times the digit, staggered from the right. Mona Sans’ tabular figures are narrow and mechanical, so the normal ones are used and the window takes the width of the digit it shows; leading zeros close to zero width.

Two views in one place

Order and payment share the same grid cell: one leaves sideways with autoAlpha, the other comes in with its children staggered. The selector’s white cushion glides with xPercent on a spring.

The ticket rolls up

New order takes the ticket’s clip-path from inset(0) to inset(0 0 100% 0), like paper rolling upwards; under it the confirmation appears with a tick drawn with strokeDashoffset (autoRound off), then everything empties and the order number rolls.

Values to change

NameFileDefaultWhat it changes
CAFE_NAMEscript.jsFennwick CoffeeThe café name at the top of the screen.
ORDER_NOscript.js214The starting order number.
FLIGHT_TIMEscript.js0.55How long the +1 takes to fly to the ticket.
ARCscript.js38How high the +1 rises before dropping into the ticket.
SPRINGscript.js1.8How far lines and the cushion overshoot when they arrive.
ROLL_TIMEscript.js0.7How long the digits take to roll.
TAP_GAPscript.js0.85The pause between taps in the self-running loop.
CHANGE_HOLDscript.js2.2How long the change stays in view before the order closes.
LOOP_PAUSEscript.js1.2The pause with an empty till before the loop starts again.

Try them in the Playground

When to use it

On the site or pitch of point of sale software for cafés, restaurants and shops, on the landing page of a tablet till app, in the demo of a counter ordering system, or as a sample screen for a payments app.

On phones

Under 600 pixels the screen turns vertical: the first six tiles in three columns, shorter and without the category, and the ticket below, taking the height that is left; notes, buttons and digits shrink and heights follow vh, so order and payment fit the 341 by 410 box. The flight is measured afresh each time and follows the screen at any size. Touch replaces hover.

With reduced motion

No flights or springs: the ticket shows the order straight away with its three lines and total, digits change without rolling, views and the closing fade, and the self-running loop does not start; everything works by hand.

Pitfalls

  • Mona Sans’ tabular figures have a dotted zero and look like a terminal font: the rolling digits use the normal ones and each window takes the width of its digit, measured at the time.
  • The +1 aimed at the line before it opened and landed too high: the line is measured at its final height before it starts from zero.
  • The total goes from one to two digits before the point: the tens column is always there and closes to zero width when it is zero, rather than rebuilding the number without rolling.
  • Between the ticket rolling up and the confirmation there was a moment of empty screen: the confirmation starts before the roll ends.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 22 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 animations