Back to the library

Flap gate change, slow beat

Variant: Slow beat

The same rolling status code, but each roll takes about 420ms instead of 190ms. Use it on ambient wall displays where nobody triggered the change and the eye is likely to be elsewhere. The curve and geometry are unchanged. The longer ease-in-out keeps the motion going long enough for peripheral vision to notice it, which matters on a display that isn't answering anyone's click.

statussplit-flapstate-changeambientvalue-roll

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>Flap gate change — slow 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-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* include only if used */

  --_cell: color-mix(in oklch, var(--slate) 88%, var(--paper));
  --_seam: color-mix(in oklch, var(--slate) 70%, transparent);
}

* { box-sizing: border-box; }

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

.board {
  width: min(420px, 92vw);
  padding: clamp(14px, 4vw, 24px);
  background: var(--slate);
  border-radius: calc(14px * var(--round));
  display: grid;
  gap: clamp(8px, 2.4vw, 14px);
}

.label {
  color: var(--oat);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cells {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 2vw, 10px);
}

.cell {
  position: relative;
  overflow: hidden;
  width: 0.86em;
  height: 1.2em;
  font-size: clamp(44px, 15vw, 88px);
  line-height: 1.2em;
  background: var(--_cell);
  border-radius: calc(8px * var(--round));
}

.cell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--_seam);
}

.col {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: roll var(--t) var(--ease-in-out) infinite both;
}

.col b {
  display: block;
  height: 1.2em;
  text-align: center;
  font-weight: 700;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

.col b.new { color: var(--clay); }

/* Same start points as the single beat; only the roll window widens.
   13% of 3.2s ≈ 420ms — slow enough for peripheral vision to catch. */
@keyframes roll {
  0%, 22% { transform: translateY(0); }
  35%, 72% { transform: translateY(-33.3333%); }
  85%, 100% { transform: translateY(-66.6667%); }
}

@keyframes roll-calm {
  0%, 14% { transform: translateY(0); opacity: 1; }
  24.9% { transform: translateY(0); opacity: 0.25; }
  25% { transform: translateY(-33.3333%); opacity: 0.25; }
  36%, 64% { transform: translateY(-33.3333%); opacity: 1; }
  74.9% { transform: translateY(-33.3333%); opacity: 0.25; }
  75% { transform: translateY(-66.6667%); opacity: 0.25; }
  86%, 100% { transform: translateY(-66.6667%); opacity: 1; }
}

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

/* No travel: the value dims, swaps while dim, and brightens. Slowed 2x. */
@media (prefers-reduced-motion: reduce) {
  .col { animation: roll-calm calc(var(--t) * 2) ease infinite both; }
}
</style>
</head>
<body>
  <div class="board" role="img" aria-label="Gate changes from B12 to D07">
    <div class="label">Gate</div>
    <div class="cells">
      <span class="cell"><span class="col"><b>B</b><b class="new">D</b><b>B</b></span></span>
      <span class="cell"><span class="col"><b>1</b><b class="new">0</b><b>1</b></span></span>
      <span class="cell"><span class="col"><b>2</b><b class="new">7</b><b>2</b></span></span>
    </div>
  </div>
</body>
</html>

The variant family

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