Skip to content
animorio
IT
All components

Gold frame guest avatar

Avatars, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 9.3 KBGSAP 28 KBFreeDownload the zip

The member card of a hotel chain's app, in frosted glass on a warm black page: the guest's avatar sits in a metal frame, silver for now, with twenty notches around it, one per night towards Gold. Adding the Lisbon stay the last three notches draw themselves one after the other and the count rolls down to zero; then a beam of light runs once around the frame, the metal turns gold, the tier rolls to Gold member and the perks arrive. The highlight on the metal follows the pointer on a spring.

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>
<!--
  "Gold frame guest avatar" 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 guest avatar whose frame turns gold</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 member card of a hotel app: the guest's avatar sits in a metal frame, silver for now, with twenty notches
         around it, one per night towards Gold. Adding the Lisbon stay lights the last three notches one by one, the
         count rolls down to zero, a beam of light runs once around the frame and the metal turns gold; the tier
         rolls to Gold member and the perks slide in. The highlight on the metal follows the pointer -->
    <div class="ga" data-wrap>
      <span class="ga__glow" aria-hidden="true">
        <span class="ga__glow-l ga__glow-l--silver"></span>
        <span class="ga__glow-l ga__glow-l--gold" data-glow-gold></span>
      </span>
      <article class="ga__card" data-card>
        <span class="ga__light" aria-hidden="true"></span>
        <span class="ga__grain" aria-hidden="true"></span>
        <header class="ga__top">
          <span class="ga__brand">Halden<span class="ga__brand-s">Stays</span></span>
          <span class="ga__since" data-since>Member since 2022</span>
        </header>

        <button class="ga__face" type="button" data-face aria-label="Elise Marchand, Silver member. Add the Lisbon stay">
          <span class="ga__frame" aria-hidden="true">
            <span class="ga__metal ga__metal--silver"></span>
            <span class="ga__metal ga__metal--gold" data-gold></span>
            <span class="ga__sweep" data-sweep></span>
          </span>
          <span class="ga__photo" aria-hidden="true">
            <span class="ga__initials" data-initials>EM</span>
          </span>
          <svg class="ga__ring" viewBox="0 0 200 200" aria-hidden="true">
            <defs>
              <filter id="ga-soft" x="-20%" y="-20%" width="140%" height="140%">
                <feGaussianBlur stdDeviation="2.2"/>
              </filter>
            </defs>
            <g data-track></g>
            <g class="ga__halo" data-halo filter="url(#ga-soft)"></g>
            <g data-fill></g>
            <g data-glints></g>
          </svg>
        </button>

        <h2 class="ga__name" data-name>Elise Marchand</h2>
        <p class="ga__tier" aria-hidden="true">
          <span class="ga__roll">
            <span class="ga__roll-i" data-tier>Silver member</span>
            <span class="ga__roll-i ga__roll-i--gold" data-tier>Gold member</span>
          </span>
        </p>

        <div class="ga__slot" aria-hidden="true">
          <p class="ga__count" data-count>
            <span class="ga__digits"><span class="ga__digits-col" data-digits></span></span>
            <span data-count-word>nights to Gold</span>
            <span class="ga__of" data-of>17 of 20</span>
          </p>
          <p class="ga__perks" data-perks>
            <span class="ga__perk" data-perk>
              <svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 4.8V8l2.2 1.4"/></svg>
              Late checkout
            </span>
            <span class="ga__perk" data-perk>
              <svg viewBox="0 0 16 16"><circle cx="5.4" cy="8" r="2.8"/><path d="M8.2 8h5.6M11.6 8v2.2M13.4 8v1.6"/></svg>
              Suite upgrades
            </span>
          </p>
        </div>

        <button class="ga__btn" type="button" data-btn>
          <span class="ga__btn-face">
            <span class="ga__btn-labels">
              <span class="ga__btn-l">
                <svg class="ga__btn-ico" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 5v10M5 10h10"/></svg>
                <span data-btn-l>Add Lisbon stay · 3 nights</span>
              </span>
              <span class="ga__btn-l">
                <svg class="ga__btn-ico" viewBox="0 0 20 20" aria-hidden="true"><path class="ga__tick" data-tick pathLength="1" d="M5.2 10.4l3.2 3.2 6.6-7"/></svg>
                <span data-btn-l>Welcome to Gold</span>
              </span>
            </span>
          </span>
        </button>
      </article>
    </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.

33 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 “Gold frame guest avatar” 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 black page a frosted glass card rises, with round corners, a fine grain and a one pixel edge that catches the light. At the top the invented brand ‘Halden Stays’ and ‘Member since 2022’; in the middle the guest's avatar, a midnight blue disc with the initials, inside a silver metal frame with a highlight turning slowly. Around the frame twenty thin notches, one per night: seventeen light up in turn, one after the other. Under the name, Elise Marchand, the tier ‘Silver member’, the line ‘3 nights to Gold · 17 of 20’ and the light ‘Add Lisbon stay · 3 nights’ button. The button gets pressed: it gives under the finger and comes back on a spring; the last three notches draw themselves clockwise with a soft halo and the number rolls from 3 to 0 while the count says 18, 19, 20 of 20. Then a beam of light runs once around the frame, the metal goes from silver to gold, the glow behind the avatar warms up, the notches turn golden, three small sparkles open and close on the ring and the avatar gives a little hop. The tier rolls to ‘Gold member’ with a sheen crossing it, ‘Member since 2022’ becomes ‘Gold until Nov 2027’, the count line makes way for two golden tags, ‘Late checkout’ with a clock and ‘Suite upgrades’ with a key, and the button turns golden and says ‘Welcome to Gold’ with a check that draws itself. After a while everything goes back to silver and the loop starts again. With the pointer the highlight on the metal turns towards it on a spring and a soft light follows it inside the glass; the button or the avatar can be pressed.

How it works

The metal is a conic gradient

The frame is a disc with a nine stop conic-gradient of light and dark, like a turned metal ring; the gold is a second identical disc on top, at zero opacity. The point the gradient starts from is a CSS variable, --ang: changing it, the highlight turns around the ring.

A spring for the highlight

From the pointer the angle to the avatar's centre is worked out with atan2, starting at the top and going clockwise. The highlight's angle chases it on a spring integrated by hand (stiffness 120, damping 15, two steps per frame), always the short way round; with no pointer it swings slowly on its own.

The notches drawn in SVG

The twenty notches are arcs on a circle of radius 95 in a 200 box, each with a gap proportional to its width. Each notch has three copies: the unlit track, the lit one with pathLength 1 and a dash revealed by its dashoffset, and a blurred one behind for the halo.

The count that rolls

The number of nights left is a column of digits, 3, 2, 1, 0, in a window one line tall: at each notch the column moves up a line on a short spring. The tier, the button and the tags do the same with two layers stacked in a grid.

Turning gold

A third disc with an almost entirely transparent conic-gradient and a white blade, in screen blending, turns 360 degrees; as it passes the gold disc fades in, the is-gold class changes the colour of the notches and the button with a CSS transition and the glow behind warms up.

Values to change

NameFileDefaultWhat it changes
GUESTscript.js'Elise Marchand'The guest's name (the initials come from it).
CITYscript.js'Lisbon'The city of the stay, in the button.
NIGHTS_GOALscript.js20The nights needed for Gold: one notch each.
NIGHTS_HAVEscript.js17The nights already stayed, lit from the start.
STAYscript.js3The nights the stay adds; if they are not enough for Gold, the frame stays silver.
TICKscript.js0.42Seconds between one notch and the next.
SHINEscript.js1How bright the highlight on the metal and the beam are.
SPRINGscript.js1How springy the presses are: 0.4 calm, 2 very bouncy.
HOLDscript.js2.6Seconds it stays gold before going back.
AUTOscript.jstrueGoes round by itself until someone touches it.

Try them in the Playground

When to use it

For the guest profile in the app of a hotel, a holiday homes chain or an airline, on the loyalty page or right after check-out: the moment of moving up a tier becomes a small celebration without confetti.

On phones

The same animation with adapted sizes: the card is as wide as the box, the avatar is sized on the screen's height and width and the notches, drawn in an SVG box, scale with it. On touch the highlight turns towards the finger.

With reduced motion

Nothing moves: the highlight stays still, the notches fade in, the gold fades in without the beam, the number changes in place and the words, the tags and the check swap with a fade.

Pitfalls

  • An angle chasing another angle, going from 179 to -179 degrees, would go all the way round: the difference is always brought back between -180 and 180 before it goes to the spring.
  • The lit notches and their halo have to be animated in two separate tweens with the same delay: put in one list with a stagger, the halo arrives when the notches have already finished.
  • The beam has to stay inside the frame (overflow hidden on the disc), otherwise the blade also passes over the photo and the initials.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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