Back to the library

Owner handoff, single beat

Variant: Single beat

An owner key leaves one avatar and settles on another. At the same moment the old owner's ring lets go, the new owner's ring takes hold, and the two role labels swap. Use it to confirm a transfer of ownership or admin rights in a members panel. Everything happens together in one 240ms ease-in-out move, so the change reads as a single fact and not a sequence of steps.

ownershiphandoffstate-changeavatarconfirmation

The source

A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="animation-knobs" content="speed: 0.8-1.4" />
<title>Owner handoff — single beat</title>
<style>
:root {
  /* Neutrals — fixed, never remixed. */
  --ivory: #faf9f5;
  --paper: #ffffff;
  --oat: #e3dacc;
  --slate: #141413;

  /* Knobs — the remix API. A knob exists iff declared here and used below. */
  --hue: 38.8;
  --lift: 0;
  --chroma: 1;
  --round: 1; /* include ONLY if at least one border-radius is wrapped below */
  --speed: 1;

  /* Accents — derived from the knobs with the family's offsets baked in,
     so one hue roll moves them together. Defaults reproduce the original hex
     (#d97757 / #b85c3e / #788c5d / #b04a3f). */
  --clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
  --clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
  --olive: oklch(calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3));
  --rust: oklch(calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3));

  /* Clock — every duration in the document runs off --t. */
  --cycle: 3.2s; /* the authored master loop */
  --t: calc(var(--cycle) / var(--speed));

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* include only if used */

  --_col: 88px;
  --_av: 52px;
  --_off: calc(var(--_av) * 0.36);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ivory);
  color: var(--slate);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.card {
  width: min(360px, 90vw);
  padding: clamp(14px, 4vw, 20px);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(14px * var(--round));
}

.eyebrow {
  margin: 0 0 clamp(12px, 3.5vw, 16px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--slate) 55%, var(--paper));
}

.stage {
  position: relative;
  display: grid;
  grid-template-columns: var(--_col) 1fr var(--_col);
  align-items: start;
  padding-top: 6px;
}

.person { grid-row: 1; display: grid; justify-items: center; text-align: center; }
.a { grid-column: 1; }
.b { grid-column: 3; }

.avatar {
  position: relative;
  width: var(--_av);
  height: var(--_av);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 600;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--oat);
}
.a .avatar { background: color-mix(in oklch, var(--clay) 22%, var(--paper)); }
.b .avatar { background: color-mix(in oklch, var(--olive) 24%, var(--paper)); }

.ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--clay);
}

.name {
  margin: 12px 0 0;
  font-size: clamp(12px, 3.4vw, 13px);
  font-weight: 600;
  white-space: nowrap;
}

.role { display: grid; margin: 2px 0 0; font-size: clamp(11px, 3vw, 12px); }
.r { grid-area: 1 / 1; }
.owner { color: var(--clay-d); font-weight: 600; }
.editor { color: color-mix(in oklch, var(--slate) 55%, var(--paper)); }

.link {
  grid-column: 2;
  grid-row: 1;
  margin: calc(var(--_av) / 2 - 1px) 8px 0;
  border-top: 2px dashed var(--oat);
}

/* The rail spans from the key's seat on avatar A to its seat on avatar B,
   so translateX(100%) on a full-width carrier is exactly one handoff at any width. */
.rail {
  position: absolute;
  top: calc(6px + var(--_av) / 2 - var(--_off));
  left: calc(var(--_col) / 2 + var(--_off));
  right: calc(var(--_col) / 2 - var(--_off));
  height: 0;
}

.carrier {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  animation: carry var(--t) var(--ease-in-out) infinite both;
}

.badge {
  position: absolute;
  left: -11px;
  top: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--clay);
  color: var(--paper);
  box-shadow: 0 0 0 2px var(--paper);
  animation: badge var(--t) var(--ease-out) infinite both;
}
.badge svg { width: 12px; height: 12px; }

.a .ring, .r.out { animation: release var(--t) var(--ease-in-out) infinite both; }
.b .ring, .r.in { animation: claim var(--t) var(--ease-in-out) infinite both; }

/* Single beat: key, rings and labels all share the 20%–27.5% window (240ms). */
@keyframes carry {
  0%, 20% { transform: translateX(0); }
  27.5%, 89% { transform: translateX(100%); }
  89.01%, 100% { transform: translateX(0); }
}

/* The key exits at B and re-enters at A; the rail snaps back while it is invisible. */
@keyframes badge {
  0%, 84% { opacity: 1; transform: scale(1); }
  88%, 92% { opacity: 0; transform: scale(0.94); }
  97%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes release {
  0%, 20% { opacity: 1; }
  27.5%, 89% { opacity: 0; }
  95%, 100% { opacity: 1; }
}

@keyframes claim {
  0%, 20% { opacity: 0; }
  27.5%, 89% { opacity: 1; }
  95%, 100% { opacity: 0; }
}

@keyframes rm-carry {
  0%, 23.75% { transform: translateX(0); }
  23.76%, 89% { transform: translateX(100%); }
  89.01%, 100% { transform: translateX(0); }
}

@keyframes rm-badge {
  0%, 20% { opacity: 1; }
  23.75% { opacity: 0; }
  27.5%, 84% { opacity: 1; }
  88%, 92% { opacity: 0; }
  97%, 100% { opacity: 1; }
}

@media (max-width: 380px) {
  :root { --_col: 78px; --_av: 46px; }
  .card { padding: 14px; }
}

/* Reduced: the key crossfades from seat to seat instead of travelling, at half pace. */
@media (prefers-reduced-motion: reduce) {
  .carrier { animation-name: rm-carry; animation-duration: calc(var(--t) * 2); }
  .badge { animation-name: rm-badge; animation-duration: calc(var(--t) * 2); }
  .a .ring, .b .ring, .r.out, .r.in { animation-duration: calc(var(--t) * 2); }
}
</style>
</head>
<body>
  <div class="card">
    <p class="eyebrow">Workspace owner</p>
    <div class="stage">
      <div class="person a">
        <div class="avatar">AM<i class="ring" aria-hidden="true"></i></div>
        <p class="name">Ada Marsh</p>
        <p class="role"><span class="r out owner">Owner</span><span class="r in editor">Editor</span></p>
      </div>
      <div class="link" aria-hidden="true"></div>
      <div class="person b">
        <div class="avatar">JR<i class="ring" aria-hidden="true"></i></div>
        <p class="name">Jun Reyes</p>
        <p class="role"><span class="r out editor">Editor</span><span class="r in owner">Owner</span></p>
      </div>
      <div class="rail" aria-hidden="true">
        <div class="carrier">
          <div class="badge">
            <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="5" cy="8" r="3" /><path d="M8 8h6.5M12 8v2.5M14.5 8v2" /></svg>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
</html>

The variant family

Same idea, one axis moved. Compare them side by side before you commit.