Back to the library

Unit chart — carry the ten

Variant: Carry the ten

A place-value board where the numeral is the chart: each digit sits over the column it counts. Single units land every 576ms on a 216ms drop; the ones column draws its ten empty slots up front, so the reader sees the carry coming four units before it happens. When the tenth lands, the full column inks clay over 144ms — ten is not a count here, it is a state — then crossfades over 216ms into a single rod, its gaps closing, which is all a ten is. Only then does the ones digit cut to 0, and a small carried 1 appears above it; the rod slides into the tens column on a 504ms ease-in-out with the 1 riding over it to sit above the tens digit, where a schoolbook carry is written, and the tens digit cuts from 1 to 2 only on arrival, absorbing the mark. The numeral is never ahead of the units. Digits cut, never roll: a place value is read the moment it exists. Use it for tallies that cross magnitudes — items into crates, minutes into hours, bytes into kilobytes — where regrouping is the thing worth explaining.

datachartcountertransitionloop

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>Unit chart — carry the ten</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;
        --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. */
        --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)
        );

        --_muted: color-mix(in srgb, var(--slate) 52%, transparent);
        --_drop: -10px;

        /* Clock — 7.2s, so 1% is 72ms. Units land every 576ms; the tenth
           fills the column at 37%, the rod leaves at 43% and lands at 50%,
           and two more units arrive into the emptied column. */
        --cycle: 7.2s;
        --t: calc(var(--cycle) / var(--speed));

        --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
        --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
      }

      /* One linear clock; every unit reads its own landing out of it. */
      @property --_p {
        syntax: '<number>';
        inherits: true;
        initial-value: 0;
      }

      * {
        box-sizing: border-box;
        margin: 0;
        padding: 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);
      }

      .board {
        width: min(232px, 66vw, 84vh);
        height: auto;
        display: block;
        overflow: visible;
        font-variant-numeric: tabular-nums;
        animation:
          clock var(--t) linear infinite,
          scene-reset var(--t) infinite;
      }

      .slot {
        fill: none;
        stroke: var(--oat);
        stroke-width: 1.5;
        rx: calc(2px * var(--round));
      }

      .base {
        stroke: var(--oat);
        stroke-width: 1.5;
      }

      .col-label {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        fill: var(--_muted);
        text-anchor: middle;
      }

      .digit {
        font-size: 32px;
        font-weight: 600;
        fill: var(--slate);
        text-anchor: middle;
      }

      /* A unit drops 10px and lands on a cubic ease-out computed from the
         shared clock: 216ms, quick enough that the count reads as tapping,
         not stacking. */
      .u {
        --_l: clamp(0, (var(--_p) - var(--_i)) / 3, 1);
        --_e: calc(1 - (1 - var(--_l)) * (1 - var(--_l)) * (1 - var(--_l)));
        fill: currentColor;
        rx: calc(2px * var(--round));
        opacity: var(--_l);
        transform: translateY(calc((1 - var(--_e)) * var(--_drop)));
      }

      .rod {
        fill: currentColor;
        rx: calc(2px * var(--round));
      }

      .rod-held {
        color: var(--slate);
      }

      .ones {
        color: var(--slate);
        animation: fuse var(--t) infinite;
      }

      .fresh {
        color: var(--slate);
      }

      .carry {
        animation: carry var(--t) infinite;
      }

      .rod-new {
        animation: rod-new var(--t) infinite;
      }

      .rod-dest {
        display: none;
      }

      .carry-mark {
        font-size: 14px;
        font-weight: 700;
        fill: var(--clay-d);
        text-anchor: middle;
        animation: carry-mark var(--t) infinite;
      }

      .tens-reel {
        animation: tens-reel var(--t) infinite;
      }

      .ones-reel {
        animation: ones-reel var(--t) infinite;
      }

      /* Rewinds inside the dark window, so the board fades back in on its
         opening state rather than on the end of the last count. */
      @keyframes clock {
        0% {
          --_p: 0;
        }
        93% {
          --_p: 93;
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          --_p: 0;
        }
      }

      /* The full column inks clay on the frame the tenth unit lands — ten is
         not a count here, it is a state — then closes its own gaps into one
         rod, which is all a ten is. */
      @keyframes fuse {
        0%,
        37% {
          color: var(--slate);
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        39% {
          color: var(--clay);
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        41.5%,
        93% {
          color: var(--clay);
          opacity: 0;
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          color: var(--slate);
          opacity: 1;
        }
      }

      @keyframes rod-new {
        0%,
        38.5% {
          color: var(--clay);
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        41.5%,
        50% {
          color: var(--clay);
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        56%,
        93% {
          color: var(--slate);
          opacity: 1;
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          color: var(--clay);
          opacity: 0;
        }
      }

      /* The rod and its carried 1 travel as one object: an on-screen move
         from A to B, so ease-in-out, over 504ms — long enough to follow, and
         the eye has to follow it, because the move is the explanation. */
      @keyframes carry {
        0%,
        43% {
          transform: translateX(0);
          animation-timing-function: var(--ease-in-out);
        }
        50%,
        93% {
          transform: translateX(-68px);
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          transform: translateX(0);
        }
      }

      /* The carried 1 is written above the ones digit as the column fuses
         and rides over the rod to sit above the tens digit — where a
         schoolbook carry is written — then is absorbed as that digit ticks. */
      @keyframes carry-mark {
        0%,
        41.5% {
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        43%,
        50% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        52.5%,
        100% {
          opacity: 0;
        }
      }

      /* Digits cut, never roll: a place value is read the moment it exists.
         Ones change as each unit finishes landing — except the tenth, whose
         0 waits for the column to fuse — and the tens digit changes only
         when the rod arrives, so the numeral is never ahead of the chart. */
      @keyframes ones-reel {
        0%,
        12.9% {
          transform: translateY(0);
        }
        13%,
        20.9% {
          transform: translateY(-40px);
        }
        21%,
        28.9% {
          transform: translateY(-80px);
        }
        29%,
        41.4% {
          transform: translateY(-120px);
        }
        41.5%,
        60.9% {
          transform: translateY(-160px);
        }
        61%,
        68.9% {
          transform: translateY(-200px);
        }
        69%,
        93.9% {
          transform: translateY(-240px);
        }
        94%,
        100% {
          transform: translateY(0);
        }
      }

      @keyframes tens-reel {
        0%,
        49.9% {
          transform: translateY(0);
        }
        50%,
        93.9% {
          transform: translateY(-40px);
        }
        94%,
        100% {
          transform: translateY(0);
        }
      }

      @keyframes scene-reset {
        0%,
        88% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        93%,
        97% {
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        100% {
          opacity: 1;
        }
      }

      @keyframes carry-fade {
        0%,
        43% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        47%,
        93% {
          opacity: 0;
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          opacity: 1;
        }
      }

      @keyframes rod-dest {
        0%,
        45% {
          color: var(--clay);
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        50% {
          color: var(--clay);
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        56%,
        93% {
          color: var(--slate);
          opacity: 1;
          animation-timing-function: steps(1, end);
        }
        94%,
        100% {
          color: var(--clay);
          opacity: 0;
        }
      }

      @media (prefers-reduced-motion: reduce) {
        /* No drops and no travel: units fade in place, and the rod fades out
           of the ones column as its twin fades into the tens. Everything runs
           at double length on one clock so digits stay welded to the units. */
        :root {
          --_drop: 0px;
        }

        .carry {
          animation-name: carry-fade;
        }

        .rod-dest {
          display: inline;
          animation: rod-dest var(--t) infinite;
        }

        .board,
        .ones,
        .carry,
        .rod-new,
        .rod-dest,
        .carry-mark,
        .tens-reel,
        .ones-reel {
          animation-duration: calc(var(--t) * 2);
        }
      }
    </style>
  </head>
  <body>
    <svg
      class="board"
      viewBox="0 -12 200 228"
      role="img"
      aria-label="A place-value board reading 16: one rod of ten and six single units. Units land one at a time in the ones column; when the tenth lands the column fuses into a rod that slides into the tens column carrying a small 1, the tens digit ticks to 2, and two more units land, ending at 22"
    >
      <defs>
        <clipPath id="tens-win"><rect x="40" y="2" width="44" height="40" /></clipPath>
        <clipPath id="ones-win"><rect x="118" y="2" width="44" height="40" /></clipPath>
      </defs>

      <g clip-path="url(#tens-win)">
        <g class="tens-reel">
          <text class="digit" x="62" y="34">1</text>
          <text class="digit" x="62" y="74">2</text>
        </g>
      </g>
      <g clip-path="url(#ones-win)">
        <g class="ones-reel">
          <text class="digit" x="140" y="34">6</text>
          <text class="digit" x="140" y="74">7</text>
          <text class="digit" x="140" y="114">8</text>
          <text class="digit" x="140" y="154">9</text>
          <text class="digit" x="140" y="194">0</text>
          <text class="digit" x="140" y="234">1</text>
          <text class="digit" x="140" y="274">2</text>
        </g>
      </g>

      <g>
        <rect class="slot" x="134" y="174" width="12" height="12" />
        <rect class="slot" x="134" y="160" width="12" height="12" />
        <rect class="slot" x="134" y="146" width="12" height="12" />
        <rect class="slot" x="134" y="132" width="12" height="12" />
        <rect class="slot" x="134" y="118" width="12" height="12" />
        <rect class="slot" x="134" y="104" width="12" height="12" />
        <rect class="slot" x="134" y="90" width="12" height="12" />
        <rect class="slot" x="134" y="76" width="12" height="12" />
        <rect class="slot" x="134" y="62" width="12" height="12" />
        <rect class="slot" x="134" y="48" width="12" height="12" />
      </g>
      <line class="base" x1="34" y1="191" x2="166" y2="191" />

      <rect class="rod rod-held" x="46" y="48" width="12" height="138" />
      <rect class="rod rod-dest" x="66" y="48" width="12" height="138" />

      <g class="ones">
        <rect class="u" x="134" y="174" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="160" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="146" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="132" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="118" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="104" width="12" height="12" style="--_i: -10" />
        <rect class="u" x="134" y="90" width="12" height="12" style="--_i: 10" />
        <rect class="u" x="134" y="76" width="12" height="12" style="--_i: 18" />
        <rect class="u" x="134" y="62" width="12" height="12" style="--_i: 26" />
        <rect class="u" x="134" y="48" width="12" height="12" style="--_i: 34" />
      </g>
      <g class="fresh">
        <rect class="u" x="134" y="174" width="12" height="12" style="--_i: 58" />
        <rect class="u" x="134" y="160" width="12" height="12" style="--_i: 66" />
      </g>

      <g class="carry">
        <rect class="rod rod-new" x="134" y="48" width="12" height="138" />
        <text class="carry-mark" x="130" y="2">1</text>
      </g>

      <text class="col-label" x="62" y="210">Tens</text>
      <text class="col-label" x="140" y="210">Ones</text>
    </svg>
  </body>
</html>

The variant family

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