Skip to content
animorio
IT
All components

Upgrade seat button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 8.0 KBGSAP 28 KBFreeDownload the zip

The button to move to a better seat in a made-up concert hall, Aurel Hall. Inside the dark pill sits a tiny map of the stalls: the arched stage, four curved rows and your amber seat at the back. On the tap the seat lifts out of its row and hops row by row towards the stage, the rows it jumps over dip by a hair, the row letter in the chip rolls from M to C; when it sits down in the free seat of the front row the stage light falls on it, the pill swells and says Row C · Seat 14 with a drawn tick.

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>
<!--
  "Upgrade seat 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 Upgrade seat button with the seat that moves up to the front row</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: move to a better seat. Pressed, your seat in the little seat map lifts out of the back row and
         hops row by row towards the stage while the row letter rolls from M to C; it lands in the free seat of the
         front row, the stage light falls on it and the pill shows your new row and seat -->
    <div class="frame" data-wrap>
      <button class="u" type="button" data-btn data-autoclic aria-describedby="u-note">
        <span class="u__skin" data-skin aria-hidden="true"></span>
        <span class="u__glow" data-glow aria-hidden="true"></span>
        <span class="u__warm" data-warm aria-hidden="true"></span>
        <span class="u__sheen" data-sheen aria-hidden="true"></span>

        <span class="u__map" aria-hidden="true">
          <svg viewBox="0 0 48 36" data-map>
            <defs>
              <linearGradient id="u-cone" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stop-color="var(--palco)" stop-opacity="0.75"></stop>
                <stop offset="1" stop-color="var(--palco)" stop-opacity="0"></stop>
              </linearGradient>
            </defs>
            <path class="m__stagefill" d="M9 6.6 Q24 1.4 39 6.6 L39 7.4 Q24 3.2 9 7.4Z"></path>
            <path class="m__stage" data-stage d="M9 6.6 Q24 1.4 39 6.6"></path>
            <path class="m__cone" data-cone d="M22.7 4.6 L25.3 4.6 L28.6 15.4 L19.4 15.4Z"></path>
            <g data-seats></g>
            <g data-mineg><rect class="m__mine" data-mine x="-2" y="-1.6" width="4" height="3.2" rx="1.1"></rect></g>
          </svg>
        </span>

        <span class="u__labels" data-labels>
          <span class="u__label" data-l="idle">Upgrade seat</span>
          <span class="u__label" data-l="wait">Moving you closer</span>
          <span class="u__label" data-l="done">Row&nbsp;<span data-rowdone>C</span><span class="u__sep">·</span><span class="u__num">Seat&nbsp;<span data-seatnum>14</span></span></span>
        </span>

        <span class="u__chip" data-chip aria-hidden="true">
          <span class="u__chipbg" data-chipbg></span>
          <span class="u__ch" data-c="price" data-price>+$24</span>
          <span class="u__ch" data-c="row">Row&nbsp;<span class="u__roll"><span class="u__strip" data-strip></span></span></span>
          <span class="u__ch u__ch--ok" data-c="ok">
            <svg viewBox="0 0 16 16"><path data-tick d="M4.2 8.4 6.9 11 11.9 5.4"></path></svg>
          </span>
        </span>
      </button>

      <p class="note" id="u-note" aria-live="polite">
        <span class="note__l" data-n="idle">Aurel Hall · Stalls · 3 seats left up front</span>
        <span class="note__l" data-n="done">Your ticket is updated · same night, closer</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.

23 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 “Upgrade seat 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 dark Upgrade seat pill: on the left, in a sunken well, the map of the stalls with the stage arc, four curved rows of grey seats, the free front-row seat in dashes and your amber seat at the back; on the right the chip with the price, +$24, and below the grey line with the hall and the seats left. On hover the label widens on the wdth axis, the skin swells on a spring, a warm light follows the pointer and your seat gives a little hop; pressed, the pill squashes slightly. On the tap the label rolls to Moving you closer and the chip becomes Row M; the seat grows, lifts out of the row leaving its empty outline and climbs in three arched hops, stretching and squashing like a drop, while each row it jumps over dips from the middle outwards and the row letter rolls from M to C. When it sits down in the free front-row seat it squashes and settles, the front row nods, a beam of light comes down from the stage, the amber comes into the pill from the left, the pill swells and a sheen crosses it; the label becomes Row C · Seat 14, the chip turns into an amber round and the tick draws itself, and the line below says the ticket is updated. In the autoplay the seat goes back after a few seconds and everything returns to rest; by hand another tap does it.

How it works

The stalls drawn by the script

The seats are SVG rects made in a loop: x at a fixed step, y rising towards the sides along a parabola, so the rows curve around the stage as in a real hall. The front row is shorter, the free seat only has a dashed outline and your seat is a separate rect inside a g that GSAP moves in viewBox units.

Hopping row by row

Each hop is a keyframes tween on the group’s x and y, with a middle point higher than both rows: the arc. Alongside, keyframes on scaleX and scaleY stretch the seat in the air and squash it on landing; halfway through each hop the row underneath gets a wave staggered from the middle outwards.

The rolling letter

In the chip a column of ten letters, from M to C, slides behind an 18-pixel window with edges faded by a mask: a power2.inOut tween as long as the hops, then one pixel too far and back, like an odometer coming to rest.

The elastic pill

The pill’s skin is a layer of its own: on hover it swells with back.out while the label goes from wdth 100 to 112, and the label box follows the width measured for both widths of the axis. On landing the skin runs different scale keyframes across and down, the swell with the bounce.

Values to change

NameFileDefaultWhat it changes
PRICEscript.js24The price of the better seat, in dollars, in the chip.
SEATscript.js14The number of the new front-row seat.
WAITscript.js1.6The seconds the seat takes to climb to the stage.
HOPscript.js1How much the seat and the rows it passes hop.
BOUNCEscript.js1.6How much the pill, the label and the chip bounce.
HOLDscript.js2.4The seconds the autoplay leaves the new seat in view.
--palcostyle.css#ffb547The amber of the stage light, your seat and the tick.
--pillolastyle.css#141318The colour of the pill.

Try them in the Playground

When to use it

In the site or app of a concert hall, a theatre or a festival, on the page of a ticket already bought: moving to a better seat by paying the difference, and seeing straight away where you end up.

On phones

The pill drops to 56 pixels and the label tightens by a point, the map stays readable; the finger taps like the mouse. Without hover the label does not widen and the light stays off.

With reduced motion

The seat does not hop: it fades out at the back and fades in on the front row, the letter is already C, the stage light and the amber fade in and the tick is already drawn.

Pitfalls

  • In the chip the row letter sat three pixels below Row: the window was an inline-block aligned to the middle of a normal-height line. With the line fixed at 18 pixels, like the window, they share a baseline.
  • The viewer’s pilot clicks every 2.8 seconds and closed the new seat as soon as it arrived: fake clicks (isTrusted false) do not go back to rest, the autoplay returns by itself after HOLD; a real tap does.
  • The space before the letter and the number in the inline-flex labels vanished: it needs a &nbsp;.
  • The label width has to be measured for both positions of the wdth axis and after document.fonts.ready, or on hover the last letter of closer was cut.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.0 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