Skip to content
animorio
IT
All components

Vet check-in button

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

The front-desk button of a made-up vet clinic, Fernhill Veterinary: once in the waiting room you check in from your phone. In the pine-green pill hangs the metal pet tag with an engraved paw, on its split ring. On the tap the tag swings, a lighter green fills the pill from the tag onwards while the label says Checking in Miso, then the tag flips over on its ring and the engraved check appears on its back: Miso is checked in · Room 2, with the minutes to the visit below. Another tap goes back to the start.

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>
<!--
  "Vet 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 Check in your pet button of a vet clinic with the pet tag that flips</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: check your pet in at the front desk. Pressed, the metal pet tag hanging on its split ring swings,
         a lighter green fills the pill from the tag while the check-in goes through, then the tag flips over on its
         ring and shows the engraved check on its back; the label says which room, the line below how long -->
    <div class="frame" data-wrap>
      <button class="c" type="button" data-btn data-autoclic aria-describedby="c-note">
        <span class="c__skin" aria-hidden="true"></span>
        <span class="c__fill" data-fill aria-hidden="true"><span class="c__edge" data-edge></span></span>
        <span class="c__glow" data-glow aria-hidden="true"></span>
        <span class="c__sheen" data-sheen aria-hidden="true"></span>
        <span class="c__grain" aria-hidden="true"></span>

        <span class="c__icon" aria-hidden="true">
          <svg class="c__ring" viewBox="0 0 34 40"><path d="M17 1.4a3.4 3.4 0 1 1-3.2 2.2"></path><path class="c__ring-hi" d="M14.5 2.6a3.4 3.4 0 0 1 4.6-.6"></path></svg>
          <span class="c__swing" data-swing>
            <span class="c__link"></span>
            <span class="c__flip" data-flip>
              <span class="tag tag--front">
                <span class="tag__shine" data-shine></span>
                <svg class="tag__mark" viewBox="0 0 24 24"><ellipse cx="7.1" cy="9.6" rx="1.75" ry="2.25" transform="rotate(-18 7.1 9.6)"></ellipse><ellipse cx="10.6" cy="6.9" rx="1.8" ry="2.35" transform="rotate(-6 10.6 6.9)"></ellipse><ellipse cx="14.4" cy="6.9" rx="1.8" ry="2.35" transform="rotate(6 14.4 6.9)"></ellipse><ellipse cx="17.9" cy="9.6" rx="1.75" ry="2.25" transform="rotate(18 17.9 9.6)"></ellipse><path d="M12.5 11.6c2.3 0 4.6 2.6 4.6 4.8 0 1.6-1.2 2.4-2.5 2.4-.9 0-1.4-.4-2.1-.4s-1.2.4-2.1.4c-1.3 0-2.5-.8-2.5-2.4 0-2.2 2.3-4.8 4.6-4.8Z"></path></svg>
              </span>
              <span class="tag tag--back">
                <span class="tag__shine" data-shine></span>
                <svg class="tag__check" viewBox="0 0 24 24"><path data-check pathLength="100" d="M7.4 12.6l3.1 3.1 6.2-6.6"></path></svg>
              </span>
            </span>
          </span>
        </span>

        <span class="c__labels" data-labels>
          <span class="c__label" data-l="idle">Check in your pet</span>
          <span class="c__label" data-l="wait">Checking in Miso</span>
          <span class="c__label" data-l="done">Miso is checked in<span class="c__sep">·</span><span class="c__room">Room <span data-room>2</span></span></span>
        </span>
      </button>

      <p class="note" id="c-note" aria-live="polite">
        <span class="note__line" data-n="idle">Fernhill Veterinary · Front desk</span>
        <span class="note__line" data-n="done">Dr. Okafor will call you in about <span data-mins>8</span> min</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.

24 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 “Vet 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 a white ground sits the pine-green Check in your pet pill, with a steel split ring on the left and hanging from it the round brushed-metal tag with an engraved paw; below, in grey, Fernhill Veterinary · Front desk. On hover a pale light follows the pointer, the label widens on the wdth axis and the pill with it, and the tag gives a small swing; pressed, the pill squashes slightly. On the tap the tag swings back, the label rolls to Checking in Miso and a lighter green, with a light on its moving edge, fills the pill from the tag to the end: quick to halfway, a short pause like the desk checking, then the rest. Then the tag flips over on its ring with a bounce, the check is cut stroke by stroke into its back and a glint crosses the metal; the pill swells a hair, a light crosses it, the label becomes Miso is checked in · Room 2 and below appears Dr. Okafor will call you in about 8 min. Another tap sends the green out to the right and turns the tag back to the paw.

How it works

The tag as a pendulum

The tag sits in a container whose rotation origin is at the top, on the ring. A damped pendulum integrated on the GSAP ticker (spring towards zero and friction, at most 1/30 of a second per step) gets a push on hover, on press, when the check-in starts and when it flips; once still, the loop writes nothing more.

The green that fills the pill

One number from 0 to 1 becomes the rounded inset clip-path of the light green layer and the position of the light on its edge. A three-part timeline (power2.out to 0.58, a slow pause to 0.66, power2.in to the end) makes the wait feel real; on the way back the left side moves, so the green leaves to the right.

The tag that flips

Two round faces with backface-visibility hidden, the back already turned 180 degrees in the CSS; GSAP turns their container with rotationY and a back.out, inside a 140-pixel perspective. The check is a path with pathLength 100 and strokeDashoffset from 100 to 0, the glint a gradient that crosses both faces.

The label that widens

Every label is measured twice, at wdth 100 and stretched, after the font has arrived; on hover GSAP moves the axis and the box width together, so the pill grows with the label without a jump.

Values to change

NameFileDefaultWhat it changes
PETscript.js"Miso"The pet’s name, in the pill.
ROOMscript.js2The exam room once checked in.
MINUTESscript.js8The minutes of waiting written below.
WAITscript.js1.5The seconds of the check-in, while the green fills the pill.
SWAYscript.js1How much the tag swings.
BOUNCEscript.js1.4How much the pill and the flipping tag bounce.
STRETCHscript.js112How much the label widens on hover, on the wdth axis.
--pinostyle.css#10372fThe dark green of the pill.
--salviastyle.css#1f5c4eThe green that fills the pill during the check-in.
--mentastyle.css#a6ecd0The colour of the room in the final label.

Try them in the Playground

When to use it

In the app or site of a vet clinic, a groomer or a pet hotel, to check in on arrival without queueing at the desk: whoever is waiting sees the room and how long to go straight away.

On phones

The pill drops to 56 pixels and the label tightens by a point; the finger taps like the mouse. Without hover the label does not widen and the light stays off; the tag swings on the tap.

With reduced motion

No pendulum, no flip and no movement: the green fades in, the tag shows the check already in place with a fade and the labels cross-fade; on the way back everything fades and the paw returns.

Pitfalls

  • The green’s clip-path must always be written with the same four values and the same round: going from inset(0 100% 0 0) to a shape with fewer values GSAP cannot interpolate it and jumps.
  • The glint and the check live inside the tag’s faces, not in their container: a transform written by GSAP on the turning container would have wiped the back face’s rotateY, which lives in the face’s CSS.
  • The stretched label width must be measured after document.fonts.ready: before Mona Sans arrives the wdth axis changes nothing and the pill stayed narrow on hover.
  • The pendulum at rest must stop writing the rotation, or GSAP rewrites the transform every frame and the preview never counts as still.
  • The preview autopilot clicks every 2.8 seconds and closed the check-in right after it finished, before Room 2 could be read: synthetic clicks (isTrusted false) in the first couple of seconds after the check are skipped; real ones, from mouse, finger or keyboard, never wait.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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