Back to the library

Contour fix confirm, cascade

Variant: Cascade

A confirmation that your position has been found. A pin lands, then the contour lines around it draw from the inside out, and the status row arrives last. Use it after a geolocation or address lookup, when the user needs to know where they are before they choose what to do next. Each element takes 192ms and starts 60ms after the one before it, so the map grows outward from the user's position instead of showing up as one block.

confirmationlocationsvgstroke-drawstagger

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" />
<title>Contour fix confirm, cascade</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 */
}

* { box-sizing: border-box; margin: 0; }

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

.card {
  width: min(320px, 88vw);
  padding: clamp(10px, 3.5vw, 14px);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(14px * var(--round));
  display: grid;
  gap: clamp(8px, 2.5vw, 12px);
}

.map {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ivory);
  border-radius: calc(9px * var(--round));
}

.grid line { stroke: var(--oat); stroke-width: 1; stroke-dasharray: 2 4; }

/* 60ms per step: pin first, then rings outward, then the label. */
.pin { --_i: 0; }
.r1 { --_i: 1; }
.r2 { --_i: 2; }
.r3 { --_i: 3; }
.r4 { --_i: 4; }
.label { --_i: 5; }

.ring {
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw var(--t) var(--ease-out) infinite both;
  animation-delay: calc(var(--_i) * 0.06s / var(--speed));
}

.pin {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: pin var(--t) var(--ease-out) infinite both;
  animation-delay: calc(var(--_i) * 0.06s / var(--speed));
}
.pin .halo { fill: var(--clay); fill-opacity: 0.2; }
.pin .dot-m { fill: var(--clay); stroke: var(--paper); stroke-width: 2; }

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: label var(--t) var(--ease-out) infinite both;
  animation-delay: calc(var(--_i) * 0.06s / var(--speed));
}
.status { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); flex: none; }
.text { display: grid; gap: 2px; min-width: 0; }
.title { font-size: clamp(13px, 3.8vw, 15px); font-weight: 600; letter-spacing: -0.01em; }
.meta { font-size: clamp(11px, 3.2vw, 12.5px); opacity: 0.62; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  margin-left: auto;
  flex: none;
  font-size: clamp(11px, 3vw, 12px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--olive) 16%, var(--paper));
  color: var(--slate);
}

/* Enter 6% of 3.2s = 192ms; exit 4% = 128ms, faster than enter. */
@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: 1; }
  6% { stroke-dashoffset: 0; }
  82% { opacity: 1; }
  86%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes pin {
  0% { opacity: 0; transform: translateY(-6px) scale(0.94); }
  6% { opacity: 1; transform: translateY(0) scale(1); }
  82% { opacity: 1; }
  86%, 100% { opacity: 0; transform: translateY(0) scale(1); }
}
@keyframes label {
  0% { opacity: 0; transform: translateY(4px); }
  6% { opacity: 1; transform: translateY(0); }
  82% { opacity: 1; }
  86%, 100% { opacity: 0; transform: translateY(0); }
}

@media (max-width: 380px) {
  .card { padding: 10px; gap: 8px; }
  .label { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ring { stroke-dashoffset: 0; animation: rm-fade calc(var(--t) * 2) var(--ease-out) infinite both; }
  .pin, .label { animation: rm-fade calc(var(--t) * 2) var(--ease-out) infinite both; }
  .ring, .pin, .label { animation-delay: calc(var(--_i) * 0.12s / var(--speed)); }
  @keyframes rm-fade {
    0%, 100% { opacity: 0.4; }
    25%, 75% { opacity: 1; }
  }
}
</style>
</head>
<body>
  <div class="card" role="status" aria-live="polite">
    <svg class="map" viewBox="0 0 280 130" aria-hidden="true">
      <g class="grid">
        <line x1="70" y1="0" x2="70" y2="130" />
        <line x1="140" y1="0" x2="140" y2="130" />
        <line x1="210" y1="0" x2="210" y2="130" />
        <line x1="0" y1="43" x2="280" y2="43" />
        <line x1="0" y1="87" x2="280" y2="87" />
      </g>
      <path class="ring r4" pathLength="1" stroke-opacity="0.45" d="M136 11 C170 8 202 32 200 62 C198 93 172 118 138 117 C104 116 78 96 80 66 C82 35 104 14 136 11 Z" />
      <path class="ring r3" pathLength="1" stroke-opacity="0.6" d="M138 27 C161 25 178 40 178 63 C178 86 161 100 140 99 C117 98 101 87 101 65 C101 43 117 29 138 27 Z" />
      <path class="ring r2" pathLength="1" stroke-opacity="0.8" d="M141 41 C156 41 164 51 163 64 C162 77 153 86 139 85 C125 84 117 76 118 64 C119 51 127 41 141 41 Z" />
      <path class="ring r1" pathLength="1" stroke-opacity="0.95" d="M140 54 C148 54 152 59 151 65 C150 72 145 75 139 75 C132 75 128 70 129 64 C130 58 134 54 140 54 Z" />
      <g class="pin">
        <circle class="halo" cx="140" cy="65" r="8" />
        <circle class="dot-m" cx="140" cy="65" r="4" />
      </g>
    </svg>
    <div class="label">
      <span class="status"></span>
      <span class="text">
        <span class="title">Position fixed</span>
        <span class="meta">47.61° N · 122.33° W</span>
      </span>
      <span class="pill">±4 m</span>
    </div>
  </div>
</body>
</html>

The variant family

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