Back to the library

Flap gate change, single beat

Variant: Single beat

A big three-character status code that rolls upward into its new value, with the new value drawn in the accent colour. Use it for one essential value that has to be read from across a room, like a gate, a queue number or a build status on a wall display. All three cells change together in about 190ms with an ease-in-out roll, so the change registers as a single event and you never catch the panel halfway through.

statussplit-flapstate-changedisplayvalue-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 — 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-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); }

/* Row 3 repeats row 1, so the jump from 100% back to 0% is invisible and the
   board always rolls in one direction. 6% of 3.2s ≈ 190ms per roll. */
@keyframes roll {
  0%, 22% { transform: translateY(0); }
  28%, 72% { transform: translateY(-33.3333%); }
  78%, 100% { transform: translateY(-66.6667%); }
}

@keyframes roll-calm {
  0%, 17% { transform: translateY(0); opacity: 1; }
  24.9% { transform: translateY(0); opacity: 0.25; }
  25% { transform: translateY(-33.3333%); opacity: 0.25; }
  33%, 67% { transform: translateY(-33.3333%); opacity: 1; }
  74.9% { transform: translateY(-33.3333%); opacity: 0.25; }
  75% { transform: translateY(-66.6667%); opacity: 0.25; }
  83%, 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.