Skip to content
animorio
IT
All components

Hotel check-in button

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

The Check in online button of a made-up hotel, Halden House, in night blue lacquer with a brass hairline on warm paper, like a Dribbble shot. Pressed, the little passport on the left opens into its data page inside the pill, four brass corners frame it and a line of light scans it from top to bottom and back: where it passes the fields print themselves and the guest’s name types itself under the title. Then the room number spins on three drums and stops one digit after the other, the page folds away into a brass digital key with the contactless arcs and the button says Room 412 ready.

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>
<!--
  "Hotel check-in 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 hotel check in button with the scanned passport and the room key</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 Check in online button of a made-up hotel, Halden House: a pill of night blue lacquer with a brass hairline
         on warm paper. Pressed, the little passport on the left opens into its data page inside the pill, four brass
         corners frame it, a line of light scans it top to bottom and back, the fields fill in (the guest's name types
         itself), the room number spins like a drum and lands on 412; then the page folds away into a brass digital
         key with the contactless arcs, and the button says Room 412 ready -->
    <div class="hc" data-wrap>
      <span class="hc__shadow" data-shadow aria-hidden="true"></span>
      <button class="hc__btn" type="button" data-btn aria-label="Check in online at Halden House">
        <span class="hc__body" data-body>
          <span class="hc__fill" aria-hidden="true"></span>
          <span class="hc__glow" aria-hidden="true"><span class="hc__glow-light" data-glow></span></span>
          <span class="hc__shine" data-shine aria-hidden="true"></span>
          <span class="hc__sweep" aria-hidden="true"><span class="hc__sweep-band" data-sweep></span></span>
          <span class="hc__edge" aria-hidden="true"></span>
          <span class="hc__row">
            <span class="hc__well" data-well aria-hidden="true">
              <span class="hc__face" data-face></span>
              <span class="hc__brass" data-brass></span>
              <svg class="hc__book" data-book viewBox="0 0 24 24">
                <rect class="hc__book-cover" x="6" y="3.6" width="12" height="16.8" rx="1.8"/>
                <path class="hc__book-spine" d="M8.2 3.8v16.4"/>
                <circle class="hc__book-seal" cx="13" cy="10.6" r="2.7"/>
                <path class="hc__book-seal" d="M10.3 10.6h5.4M13 7.9c-1 .8-1 4.6 0 5.4M13 7.9c1 .8 1 4.6 0 5.4"/>
                <path class="hc__book-line" d="M10.6 16.2h4.8"/>
              </svg>
              <span class="hc__card" data-card>
                <svg class="hc__page" viewBox="0 0 64 44" preserveAspectRatio="none">
                  <defs>
                    <linearGradient id="hc-paper" x1="0" y1="0" x2="0.4" y2="1">
                      <stop offset="0" stop-color="#fbf7ee"/>
                      <stop offset="1" stop-color="#ece3d1"/>
                    </linearGradient>
                    <linearGradient id="hc-photo" x1="0" y1="0" x2="0" y2="1">
                      <stop offset="0" stop-color="#c9d2dc"/>
                      <stop offset="1" stop-color="#9eacbb"/>
                    </linearGradient>
                    <clipPath id="hc-photo-clip"><rect x="5" y="6" width="15" height="19" rx="1.6"/></clipPath>
                  </defs>
                  <rect class="hc__paper" x="0" y="0" width="64" height="44" rx="6"/>
                  <path class="hc__guill" d="M-2 9c6-4 10 4 16 0s10 4 16 0 10 4 16 0 10 4 16 0 10 4 16 0"/>
                  <path class="hc__guill" d="M-2 15c6-4 10 4 16 0s10 4 16 0 10 4 16 0 10 4 16 0 10 4 16 0"/>
                  <path class="hc__guill" d="M-2 21c6-4 10 4 16 0s10 4 16 0 10 4 16 0 10 4 16 0 10 4 16 0"/>
                  <path class="hc__guill" d="M-2 27c6-4 10 4 16 0s10 4 16 0 10 4 16 0 10 4 16 0 10 4 16 0"/>
                  <rect x="5" y="6" width="15" height="19" rx="1.6" fill="url(#hc-photo)"/>
                  <g clip-path="url(#hc-photo-clip)" class="hc__sil">
                    <circle cx="12.5" cy="13.4" r="3.6"/>
                    <path d="M5.4 26c.6-4.6 3.6-7 7.1-7s6.5 2.4 7.1 7z"/>
                  </g>
                  <rect class="hc__ghost" x="24" y="7.6" width="12" height="1.8" rx="0.9"/>
                  <rect class="hc__ghost" x="24" y="12" width="30" height="2.6" rx="1.3"/>
                  <rect class="hc__ghost" x="24" y="17.6" width="24" height="2.6" rx="1.3"/>
                  <rect class="hc__ghost" x="24" y="23" width="18" height="2.2" rx="1.1"/>
                  <rect class="hc__read hc__read--soft" data-field data-y="7.6" x="24" y="7.6" width="12" height="1.8" rx="0.9"/>
                  <rect class="hc__read" data-field data-y="12" x="24" y="12" width="30" height="2.6" rx="1.3"/>
                  <rect class="hc__read" data-field data-y="17.6" x="24" y="17.6" width="24" height="2.6" rx="1.3"/>
                  <rect class="hc__read hc__read--soft" data-field data-y="23" x="24" y="23" width="18" height="2.2" rx="1.1"/>
                  <path class="hc__mrz-ghost" d="M5 32.6h54M5 37.8h54"/>
                  <path class="hc__mrz" data-field data-y="32.6" d="M5 32.6h54"/>
                  <path class="hc__mrz" data-field data-y="37.8" d="M5 37.8h54"/>
                </svg>
                <span class="hc__read-tint" data-tint></span>
                <span class="hc__beam" data-beam><span class="hc__beam-trail"></span><span class="hc__beam-line"></span></span>
              </span>
              <svg class="hc__frame" data-frame viewBox="0 0 64 44">
                <path data-corner d="M3.5 10.5V7.5a4 4 0 0 1 4-4h3"/>
                <path data-corner d="M53.5 3.5h3a4 4 0 0 1 4 4v3"/>
                <path data-corner d="M60.5 33.5v3a4 4 0 0 1-4 4h-3"/>
                <path data-corner d="M10.5 40.5h-3a4 4 0 0 1-4-4v-3"/>
              </svg>
              <svg class="hc__key" data-key viewBox="0 0 24 24">
                <circle class="hc__key-bow" data-key-line pathLength="1" cx="8.4" cy="12" r="3.5"/>
                <path class="hc__key-blade" data-key-line pathLength="1" d="M11.9 12h7.2v2.6M16.6 12v2"/>
                <path class="hc__arc" data-arc pathLength="1" d="M15.4 5.6a3 3 0 0 1 2.6 2"/>
                <path class="hc__arc" data-arc pathLength="1" d="M16 3.2a5.6 5.6 0 0 1 4.4 3.6"/>
              </svg>
            </span>
            <span class="hc__text" aria-hidden="true">
              <span class="hc__state" data-state>
                <span class="hc__title" data-t>Check in online</span>
                <span class="hc__sub" data-s data-stay>Halden House</span>
              </span>
              <span class="hc__state" data-state>
                <span class="hc__title hc__title--busy" data-t>Scanning passport</span>
                <span class="hc__sub" data-s><span class="hc__lbl">Guest</span> <span data-name></span></span>
              </span>
              <span class="hc__state" data-state>
                <span class="hc__title hc__title--busy" data-t>Assigning room</span>
                <span class="hc__sub" data-s data-guest></span>
              </span>
              <span class="hc__state" data-state>
                <span class="hc__title" data-t data-ready></span>
                <span class="hc__sub" data-s>Digital key in your wallet</span>
              </span>
            </span>
            <span class="hc__chip" data-chip aria-hidden="true">
              <span class="hc__chip-glaze" data-chip-glaze></span>
              <span class="hc__chip-lbl">Room</span>
              <span class="hc__room" data-room></span>
            </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.

27 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 “Hotel check-in 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 warm paper, lit by a soft light from the upper left and with a very fine grain, a single pill button 60 pixels tall in night blue lacquer: it catches the light at the top, goes into shadow at the bottom, its edge is a very thin brass hairline and under the pill the paper darkens into a long soft shadow. On the left, in a small well pressed into the lacquer, a brass passport with its seal; in the middle Check in online and under it Halden House · 2 nights; on the right a little window with a brass rim, Room, and three drums still empty, each with a brass bar. With the mouse over it a cold light follows the pointer and the passport leans towards you on a spring. Pressed, the lacquer sinks by a pixel and comes back; the passport turns and disappears, the well widens into a rectangle and inside it the cream data page opens, with the fine lines of the security background, the photo and the fields still empty; four brass corners come in from outside and frame it. A line of white and brass light, with a trail behind it, goes down the page: where it passes the fields print themselves one after the other, the two code lines at the bottom fill in, the paper warms a little, and meanwhile the words Scanning passport shimmer and under them the guest’s name types itself letter by letter, Eliza Marlowe. The light runs back up, the corners squeeze the page and the page flashes once: read. The words become Assigning room and the room number spins on the three drums, blurred, and stops with a small bounce first on 4, then on 1, then on 2. Then the page folds away, the well turns round again and fills with brass, a key draws itself inside it with the contactless arcs lighting up above, the room window turns to brass, a warm light spreads from the key, a reflection crosses the lacquer and the words say Room 412 ready, Digital key in your wallet. Until someone touches it, the button goes round by itself and back to rest; touched for real, it stays on Room 412 ready until it is pressed again.

How it works

Lacquer in layers

The button is a single box (moved only by GSAP) with absolute layers: the night blue lacquer with light from above, the brass light of the success anchored to the well, the light under the pointer driven by two CSS variables through gsap.quickTo, the reflection band and on top the inner shadows: the brass hairline, the light at the top, the shadow at the bottom. Underneath, a blurred oval shadow on the paper that widens on hover and tightens on press.

The page that opens

The well is a single element whose width GSAP takes from 44 to 64 and borderRadius from 22 to 7 on a spring: the words next to it move by themselves because they sit in the same flex row. Inside, the data page is a 64 by 44 SVG (gradient paper, wavy security lines, a clipped photo with the silhouette, ghost fields and real fields, two dashed code lines), and the four brass corners are a 72 by 52 SVG coming in from scale 1.3.

The scan that prints the fields

The line of light is a span with the white thread and the gradient trail, moved in y with sine.inOut. Each field keeps its height in data-y: the same sine.inOut is inverted to know when the light passes over it, and there the field goes from scaleX 0 to 1 starting from the left. The name types itself with a tween on a number that cuts the string at every update. On the way back the trail flips with a class.

The number on drums

Each digit of the room is a window one line tall over a column with 0-9 three times. The drum goes to yPercent -(20 + digit) times 100/30, so it turns twice before stopping, with a light back.out and a blur filter that clears as it slows down; the drums start almost together but each spins 0.24 seconds longer than the one before, so they stop one after the other.

The key and the loop

The key is a circle and a path with pathLength 1 drawn with strokeDashoffset, then the contactless arcs, while the well fills with brass on a spring. A fake pointer moves the light, presses and checks in; after HOLD seconds it goes back to rest. At the first real touch the loop stops. Everything starts from the load event, so poster and video always land on the same moment.

Values to change

NameFileDefaultWhat it changes
HOTELscript.jsHalden HouseThe hotel’s name on the small line at rest.
GUESTscript.jsEliza MarloweThe guest’s name read from the passport.
ROOMscript.js412The room number the drums stop on (digits only, up to four).
NIGHTSscript.js2How many nights, on the small line.
SCANscript.js1.2Seconds the line of light takes to go down the page.
SPINscript.js1.1Seconds the first drum of the room number spins.
SPRINGscript.js1How springy the moves are: 0.4 calm, 2 very bouncy.
HOLDscript.js3In the loop, how many seconds it stays on Room ready before going back to rest.
AUTOscript.jstrueThe button goes round by itself until someone touches it.

Try them in the Playground

When to use it

For the site or app of a hotel, a resort, a holiday rental chain or a hostel, in the booking confirmation email or on the stay page: it checks in before arrival, shows the document being read, assigns the room and hands over the digital key.

On phones

On the phone the button is at most 88% of the screen wide and long words end with an ellipsis; there is no hover, so the light under the finger turns on at the touch and the rest is the same.

With reduced motion

Nothing moves: the page, the corners, the fields and the key fade in, there is no line of light, the name appears whole, the room digits appear already in place and the brass light grows only in strength.

Pitfalls

  • The fields printed at equally spaced times while the light, moving with sine.inOut, reached the first ones late and the last ones early: the moment of every field is computed with the same curve as the light.
  • The trail flip on the way back was written as className in a GSAP set, which version 3 no longer handles: it is now a classList.add inside the timeline.
  • With drums holding 0-9 only once the 2 arrived at once and did not spin: the column has the digits three times and the drum stops on the third, so every digit turns twice first.
  • The loop started when the script was read, and the poster landed on different moments: it starts from the page’s load event.

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 4 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