Back to the library

Shelter cover confirm, cascade

Variant: Cascade

A confirmation for adding several people to a plan or a protected group. Two arms draw up from the ground and meet over three figures, and each figure fills in as it is covered. Use it when the user should see that each person was included, not only that the action succeeded. The child fills first and the adults follow 60ms apart. On exit the figures leave before the arms fade, so nobody is shown uncovered.

confirmationstroke-drawstaggersvgfamily

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>Shelter cover 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 */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* include only if used */
}

* { 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(300px, 88vw);
  padding: clamp(14px, 4.5vw, 22px);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(18px * var(--round));
  display: grid;
  gap: clamp(8px, 2.5vw, 14px);
}

.scene {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34vh;
  overflow: visible;
}

.ground { stroke: var(--oat); stroke-width: 2; stroke-linecap: round; }
.base { fill: var(--oat); }

.arm {
  fill: none;
  stroke: var(--clay);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  animation: arm var(--t) var(--ease-out) infinite both;
}

.p {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cover var(--t) var(--ease-out) infinite both;
  /* 60ms per figure: close enough to read as one gesture, far enough to count three. */
  animation-delay: calc(var(--_i) * 60ms / var(--speed));
}
.p.adult { fill: var(--olive); }
.p.child { fill: var(--clay); }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: status var(--t) var(--ease-out) infinite both;
}

.badge {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--olive);
  display: grid;
  place-items: center;
}
.badge svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.title { margin: 0; font-size: clamp(13px, 3.8vw, 15px); font-weight: 600; line-height: 1.25; }
.sub { margin: 0; font-size: clamp(11px, 3.2vw, 12.5px); opacity: 0.62; line-height: 1.3; }

/* 1% = 32ms. Arms 288ms; each figure 224ms after a 128ms lead; label lands after the last figure. */
@keyframes arm {
  0% { stroke-dashoffset: 1; opacity: 0; }
  1% { opacity: 1; }
  9% { stroke-dashoffset: 0; }
  86% { stroke-dashoffset: 0; opacity: 1; }
  92% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}

@keyframes cover {
  0%, 4% { opacity: 0; transform: translateY(3px) scale(0.94); }
  11% { opacity: 1; transform: translateY(0) scale(1); }
  82% { opacity: 1; transform: translateY(0) scale(1); }
  87% { opacity: 0; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(3px) scale(0.94); }
}

@keyframes status {
  0%, 13% { opacity: 0; transform: translateY(4px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  84% { opacity: 0; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(4px); }
}

@keyframes rm-soft {
  0%, 100% { opacity: 0.4; }
  35%, 80% { opacity: 1; }
}
@keyframes rm-fill {
  0%, 100% { opacity: 0.25; }
  35%, 80% { opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
  .arm {
    stroke-dashoffset: 0;
    animation: rm-soft calc(var(--t) * 2) var(--ease-in-out) infinite both;
  }
  .p {
    transform: none;
    animation: rm-fill calc(var(--t) * 2) var(--ease-in-out) infinite both;
    animation-delay: calc(var(--_i) * 120ms / var(--speed));
  }
  .status {
    transform: none;
    animation: rm-soft calc(var(--t) * 2) var(--ease-in-out) infinite both;
  }
}
</style>
</head>
<body>
<div class="card" role="status">
  <svg class="scene" viewBox="0 0 160 96" aria-hidden="true">
    <line class="ground" x1="14" y1="87" x2="146" y2="87" />
    <g class="base">
      <circle cx="54" cy="52" r="8" /><path d="M40 87 v-7 a14 14 0 0 1 28 0 v7 Z" />
      <circle cx="106" cy="52" r="8" /><path d="M92 87 v-7 a14 14 0 0 1 28 0 v7 Z" />
      <circle cx="80" cy="64" r="6" /><path d="M70 87 v-5 a10 10 0 0 1 20 0 v5 Z" />
    </g>
    <g class="p adult" style="--_i: 1"><circle cx="54" cy="52" r="8" /><path d="M40 87 v-7 a14 14 0 0 1 28 0 v7 Z" /></g>
    <g class="p adult" style="--_i: 2"><circle cx="106" cy="52" r="8" /><path d="M92 87 v-7 a14 14 0 0 1 28 0 v7 Z" /></g>
    <g class="p child" style="--_i: 0"><circle cx="80" cy="64" r="6" /><path d="M70 87 v-5 a10 10 0 0 1 20 0 v5 Z" /></g>
    <path class="arm" pathLength="1" d="M22 86 C22 46 48 18 80 18" />
    <path class="arm" pathLength="1" d="M138 86 C138 46 112 18 80 18" />
  </svg>
  <div class="status">
    <span class="badge"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8.5 L6.6 11.1 L12 5.5" /></svg></span>
    <div>
      <p class="title">Everyone's covered</p>
      <p class="sub">3 members &middot; plan active</p>
    </div>
  </div>
</div>
</body>
</html>

The variant family

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