Skip to content
animorio
IT
All components

Suite upgrade button

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

The button to move up to the suite in a hotel booking, a pill of ink coloured lacquer on white, like a Dribbble shot: on the left the small amber display of a lift with the floor of the room, then Upgrade to Suite with the view and the extra price. Tapped, the floors climb one after the other like in a real lift, fast in the middle and slow at the top, blurred by their own speed, while the chevrons run upward; on arrival the number goes a pixel too far and settles, a band of warm light opens from the middle like the lift doors and the plus becomes a 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>
<!--
  "Suite upgrade 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 to suite button with the floor rising like a lift</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 room upgrade button of a hotel booking: a pill of deep ink lacquer with the little floor display of a lift on
         the left. Tapped, the floor numbers climb like a lift going up, fast in the middle and slow at the top, the
         chevrons run upward, and on arrival a line of light opens across the pill like the lift doors: the suite is yours -->
    <div class="up" data-wrap>
      <span class="up__floor" data-floorglow aria-hidden="true"></span>
      <button class="up__btn" type="button" data-btn data-autoclic aria-label="Upgrade to the Sea View Suite, 140 dollars more per night">
        <span class="up__body" data-body>
          <span class="up__base" aria-hidden="true"></span>
          <span class="up__shine" data-shine aria-hidden="true"></span>
          <span class="up__grain" aria-hidden="true"></span>
          <span class="up__doors" aria-hidden="true"><span class="up__door-line" data-doorline></span></span>
          <span class="up__row">
            <span class="up__display" data-display aria-hidden="true">
              <span class="up__haze" data-haze></span>
              <span class="up__lcd">
                <span class="up__strip" data-strip></span>
              </span>
              <span class="up__chev" data-chevs>
                <svg viewBox="0 0 12 8"><path data-chev d="M2 6 6 2l4 4"/></svg>
                <svg viewBox="0 0 12 8"><path data-chev d="M2 6 6 2l4 4"/></svg>
              </span>
              <span class="up__glass" data-glass></span>
            </span>
            <span class="up__words">
              <span class="up__stack" aria-hidden="true">
                <span class="up__label" data-label>Upgrade to Suite</span>
                <span class="up__label" data-label>Going up</span>
                <span class="up__label" data-label>Suite 1204 is yours</span>
              </span>
              <span class="up__stack" aria-hidden="true">
                <span class="up__sub" data-sub>Sea view · <span class="up__price">+$140</span> a night</span>
                <span class="up__sub" data-sub>Holding the suite for you</span>
                <span class="up__sub" data-sub>Floor 12 · Sea view terrace</span>
              </span>
            </span>
            <span class="up__end" aria-hidden="true">
              <svg viewBox="0 0 24 24">
                <circle class="up__end-ring" data-endring cx="12" cy="12" r="10.5"/>
                <path class="up__end-plus" data-plus d="M12 7.6v8.8M7.6 12h8.8"/>
                <path class="up__end-tick" data-tick d="M7.4 12.4l3.1 3 6.1-6.6"/>
              </svg>
            </span>
          </span>
        </span>
      </button>
    </div>
    <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.

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 “Suite upgrade 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 pure white, alone in the middle, there is a pill button 60 pixels tall made of ink coloured lacquer, with a very fine grain, a top edge that catches the light in one pixel and a soft three layer shadow on the floor. On the left there is the small display of a lift, a porthole of dark glass with a diagonal reflection and an amber haze from below: inside the number 4 in amber, a little narrow and glowing, and next to it an up chevron. Then the words Upgrade to Suite with Sea view · +$140 a night underneath, the price in amber; on the right a plus inside a thin circle. With the mouse over it a soft light follows the pointer in the lacquer, the words widen a little on the wdth axis of the typeface, the number rises three pixels and peeks at the next floor, and the chevron gives a little nudge up. Pressed, the pill sinks by a pixel and narrows a little, the shadow gathers, and on release it springs back. Then the words become Going up with Holding the suite for you underneath, the plus turns a quarter and dims, the circle warms to amber and the haze of the display grows; the numbers roll from 4 to 12 like in a real lift, slow on the first floors, fast in the middle and slow again at the top, and while they run they blur in proportion to their speed; meanwhile two chevrons climb one after the other. On arrival the 12 goes a pixel too far and comes back, flares for a moment, from the middle of the pill a thread of warm light opens into a wide band and fades like the lift doors, the pill swells by a hair and settles, the plus has become an amber tick that draws itself and the words say Suite 1204 is yours, with Floor 12 · Sea view terrace underneath. After two and a half seconds the lift rides quickly back down to 4 and the button is as before. Until someone touches it, it goes round by itself.

How it works

The lacquer in layers

The button is a single box moved only by GSAP; inside, absolute layers with the same radius: the lacquer with a vertical gradient, the light under the pointer (a radial-gradient on two CSS variables moved by gsap.quickTo), the feTurbulence grain in an SVG background with three inner shadows for the one pixel edge, and the doors band with mix-blend-mode screen.

The tape display

The floors from 4 to 12 are cells 22 pixels tall in a column inside a window with overflow hidden and a mask-image that fades top and bottom. An object with a number f goes from 4 to 12 and on every frame the column is set to y = -(f - 4) times 22: so the number can stop halfway too, like in real displays.

The ride of the lift

The climb is a power3.inOut to 12.07, a pixel and a half past the last floor, then a back.out brings it back to 12: that is the car settling. The speed is measured between one frame and the next (step kept between 1/120 and 1/30 of a second) and becomes a blur filter up to 1.3 pixels, which disappears when the tape stops.

The chevrons and the doors

During the ride a looping timeline moves two SVG chevrons from below to above, a quarter of a second apart, with the opacity rising and falling. On arrival a layer as wide as the pill, with an amber gradient brighter in the middle, goes from scaleX 0.02 to 1.1 from the centre and then fades: those are the doors opening.

The words and the tick

Three labels and three sublines sit in the same grid cell: the old one leaves upward with yPercent -100, the new one comes from below with a back.out. On hover the label goes from wdth 100 to 112 with a CSS variable inside font-variation-settings. The tick has pathLength 1 and draws itself with strokeDashoffset from 1 to 0 while the plus turns and shrinks.

Values to change

NameFileDefaultWhat it changes
FROM_FLOORscript.js4The floor of the booked room, where the lift starts.
TO_FLOORscript.js12The floor of the suite, where the lift arrives.
PRICEscript.js+$140The extra price a night.
RIDEscript.js1.8How many seconds the lift takes to go up.
HOLDscript.js2.4How many seconds the suite stays confirmed before the button goes back to rest.
SPRINGscript.js1How springy the press and the arrival are: 0.4 calm, 2 very bouncy.
AUTOscript.jstrueThe button goes round by itself until someone touches it.

Try them in the Playground

When to use it

For the room upgrade in the booking of a hotel, a resort or a vacation rental: the button that offers the suite or the better room, with the extra price and the confirmation told inside the button itself. It also works for a better seat on a plane or a train, or for moving up to a higher subscription plan.

On phones

On the phone the button is at most 86% of the screen wide and the rest is the same; there is no hover, so the light under the finger turns on at the touch and the press is the same.

With reduced motion

Nothing moves: the number changes from 4 to 12 with a fade, the words change in place, the light of the doors fades in and out without opening, the tick draws itself and the pill stays still.

Pitfalls

  • The 12 did not fit in the 22 pixel window and was cut on the side: the window is 25 wide and the numbers use the narrow width (wdth 88) with tabular figures, so 4 and 12 sit in the same column without jumping.
  • The blur computed from the speed exploded when two updates landed almost at the same instant, because the time between them was nearly zero: the measured step stays between 1/120 and 1/30 of a second and the blur stops at 1.3 pixels.
  • A timeline with opacity keyframes inside a fromTo left the chevrons lit at the top of the loop: now the climb and the opacity are two separate tweens with immediateRender false, and at the end of the ride the second chevron goes back hidden below.
  • GSAP does not read font-variation-settings as a number: the width of the label is a CSS variable --w inside font-variation-settings, and GSAP moves the variable.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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