Back to the library

Receipt — not delivered, retry in place

Variant: Failed, retry

A message that fails stays exactly where it was sent. The clock waits 2.4 seconds, then gives way to a small rust mark that arrives from 90% scale in 160ms — a stamp, not an alarm, because a failure that pulses or bounces keeps shouting after it has been read. The bubble dims to 72% — still readable, because the person needs to know what they are resending — and keeps its seat in the thread; where a message sits is part of what it says, and a failure parked in a toast elsewhere on the page is one that can time out before anyone sees it. It does not shake: shake means "you did that wrong", and the network did this, not the person. Retry dips for 80ms and the label hands back to "Sending" just after the bottom of the dip, so the press is seen and the state change answers it; then the very same clock returns — the message is simply in flight again, not in a new "retrying" state anyone has to learn — and it goes through to one tick and two. Reach for it wherever sends can fail offline: chat, comments, form submissions queued on a flaky connection.

errorstatusindicatorcontrolsvgloop

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>Receipt — not delivered, retry in place</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)
        );

        /* Clock — 8s, so 1% is 80ms. In flight until 30%, failed until Retry
           is pressed at 52%, in flight again until 64%, sent, delivered at 72%. */
        --cycle: 8s;
        --t: calc(var(--cycle) / var(--speed));

        --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

        --_muted: color-mix(in srgb, var(--slate) 54%, transparent);
        --_in: color-mix(in srgb, var(--oat) 45%, var(--paper));
        --_hand: calc(1.2s / var(--speed));
        --_lag: calc(60ms / var(--speed));
      }

      * {
        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);
      }

      .card {
        width: min(320px, 90vw);
        background: var(--paper);
        border: 1px solid var(--oat);
        border-radius: calc(14px * var(--round));
        overflow: hidden;
      }

      .head {
        display: flex;
        justify-content: space-between;
        padding: 10px 14px;
        font-size: 11.5px;
        color: var(--_muted);
        border-bottom: 1px solid var(--oat);
      }

      .head b {
        color: var(--slate);
        font-weight: 600;
      }

      .thread {
        display: grid;
        gap: 6px;
        padding: clamp(12px, 4vw, 16px) 14px;
      }

      .in,
      .out {
        max-width: 80%;
        padding: 7px 11px;
        font-size: 13px;
        line-height: 1.35;
        border-radius: calc(14px * var(--round));
      }

      .in {
        justify-self: start;
        background: var(--_in);
      }

      .out {
        justify-self: end;
        margin-top: 4px;
        color: var(--paper);
        background: var(--clay-d);
        transform-origin: 100% 100%;
        animation: out var(--t) infinite;
      }

      /* The failed bubble dims and keeps its seat. It does not shake — the
         network failed, not the person — and it does not move out of order,
         because where a message sits in a thread is part of what it says. */
      @keyframes out {
        0% {
          opacity: 0;
          transform: translateY(8px) scale(0.97);
          animation-timing-function: var(--ease-out);
        }
        3%,
        30% {
          opacity: 1;
          transform: none;
          animation-timing-function: ease;
        }
        33%,
        52.5% {
          opacity: 0.72;
          transform: none;
          animation-timing-function: ease;
        }
        54%,
        92% {
          opacity: 1;
          transform: none;
          animation-timing-function: var(--ease-out);
        }
        94.25%,
        100% {
          opacity: 0;
          transform: none;
        }
      }

      .meta {
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 5px;
        height: 14px;
        font-size: 11.5px;
        color: var(--_muted);
        animation: life var(--t) infinite backwards;
        animation-delay: var(--_lag);
      }

      @keyframes life {
        0% {
          opacity: 0;
          transform: translateY(8px) scale(0.97);
          animation-timing-function: var(--ease-out);
        }
        3%,
        92% {
          opacity: 1;
          transform: none;
          animation-timing-function: var(--ease-out);
        }
        94.25%,
        100% {
          opacity: 0;
          transform: none;
        }
      }

      /* The mark trails the words, so every state ends flush against it
         and the glyph never floats away from a short label. */
      .glyph {
        order: 2;
        display: grid;
        width: 17px;
        height: 12px;
      }

      .glyph > svg {
        grid-area: 1 / 1;
        width: 17px;
        height: 12px;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

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

      .clock .hand {
        transform-box: view-box;
        transform-origin: 11px 6px;
        animation: hand var(--_hand) linear infinite;
      }

      @keyframes hand {
        to {
          transform: rotate(360deg);
        }
      }

      /* Retry puts back the exact clock the first attempt wore. Same glyph,
         same place: the message is simply in flight again, not in some new
         "retrying" state the reader has to learn. */
      @keyframes clock {
        0%,
        29.5% {
          opacity: 1;
        }
        30.5%,
        52.5% {
          opacity: 0;
        }
        53.5%,
        63.5% {
          opacity: 1;
        }
        64.5%,
        100% {
          opacity: 0;
        }
      }

      .fail {
        transform-box: view-box;
        transform-origin: 11px 6px;
        opacity: 0;
        animation: fail var(--t) infinite;
      }

      .fail circle {
        fill: var(--rust);
        stroke: none;
      }

      .fail path {
        stroke: var(--paper);
        stroke-width: 1.6;
      }

      /* 160ms, from scale 0.9: arrives like a stamp, not an alarm. A failure that
         pulses or bounces keeps shouting after it has been read. */
      @keyframes fail {
        0%,
        30% {
          opacity: 0;
          transform: scale(0.9);
          animation-timing-function: var(--ease-out);
        }
        32%,
        52.5% {
          opacity: 1;
          transform: none;
          animation-timing-function: ease;
        }
        53.5%,
        100% {
          opacity: 0;
          transform: none;
        }
      }

      .t1 {
        stroke-dasharray: 16;
        stroke-dashoffset: 16;
        animation: t1 var(--t) infinite;
      }

      @keyframes t1 {
        0%,
        64% {
          stroke-dashoffset: 16;
          animation-timing-function: var(--ease-out);
        }
        66.25%,
        100% {
          stroke-dashoffset: 0;
        }
      }

      .t2 {
        opacity: 0;
        transform-box: view-box;
        animation: t2 var(--t) infinite;
      }

      @keyframes t2 {
        0%,
        72% {
          opacity: 0;
          transform: translateX(-4px);
          animation-timing-function: var(--ease-out);
        }
        75%,
        100% {
          opacity: 1;
          transform: none;
        }
      }

      .label {
        display: grid;
        justify-items: end;
      }

      .label > span {
        grid-area: 1 / 1;
        white-space: nowrap;
        opacity: 0;
        animation-duration: var(--t);
        animation-iteration-count: infinite;
        animation-timing-function: ease;
      }

      .l-sending {
        animation-name: l-sending;
      }
      .l-fail {
        animation-name: l-fail;
      }
      .l-sent {
        animation-name: l-sent;
      }
      .l-delivered {
        animation-name: l-delivered;
      }

      @keyframes l-sending {
        0%,
        29.5% {
          opacity: 1;
        }
        30.5%,
        52.5% {
          opacity: 0;
        }
        53.5%,
        63.5% {
          opacity: 1;
        }
        64.5%,
        100% {
          opacity: 0;
        }
      }
      @keyframes l-fail {
        0%,
        29.5% {
          opacity: 0;
        }
        30.5%,
        52.5% {
          opacity: 1;
        }
        53.5%,
        100% {
          opacity: 0;
        }
      }
      @keyframes l-sent {
        0%,
        63.5% {
          opacity: 0;
        }
        64.5%,
        71.5% {
          opacity: 1;
        }
        72.5%,
        100% {
          opacity: 0;
        }
      }
      @keyframes l-delivered {
        0%,
        71.5% {
          opacity: 0;
        }
        72.5%,
        100% {
          opacity: 1;
        }
      }

      .retry {
        display: inline-block;
        font-weight: 600;
        color: var(--rust);
        animation: press var(--t) infinite;
      }

      /* 80ms down, 120ms up; the dip lands just before the label hands back
         to "Sending", so the press is seen and the state change answers it. */
      @keyframes press {
        0%,
        51.5% {
          transform: scale(1);
          animation-timing-function: var(--ease-out);
        }
        52.5% {
          transform: scale(0.96);
          animation-timing-function: var(--ease-out);
        }
        54%,
        100% {
          transform: scale(1);
        }
      }

      @media (prefers-reduced-motion: reduce) {
        /* The press dip, the entrance rise, the stamp's scale and the clock
           hand's sweep go; the dim, the glyph swaps and every label change
           stay, because they are the content. Every timeline stretches by 1.5. */
        .retry,
        .clock .hand {
          animation: none;
        }

        .out {
          animation-name: out-still;
        }

        @keyframes out-still {
          0% {
            opacity: 0;
          }
          3%,
          30% {
            opacity: 1;
          }
          33%,
          52.5% {
            opacity: 0.72;
          }
          54%,
          92% {
            opacity: 1;
          }
          94.25%,
          100% {
            opacity: 0;
          }
        }

        .meta {
          animation-name: life-still;
          animation-delay: calc(var(--_lag) * 1.5);
        }

        @keyframes life-still {
          0% {
            opacity: 0;
          }
          3%,
          92% {
            opacity: 1;
          }
          94.25%,
          100% {
            opacity: 0;
          }
        }

        .fail {
          animation-name: fail-still;
        }

        @keyframes fail-still {
          0%,
          30% {
            opacity: 0;
          }
          32%,
          52.5% {
            opacity: 1;
          }
          53.5%,
          100% {
            opacity: 0;
          }
        }

        .t1 {
          stroke-dashoffset: 0;
          animation-name: t1-still;
        }

        @keyframes t1-still {
          0%,
          64% {
            opacity: 0;
          }
          66.25%,
          100% {
            opacity: 1;
          }
        }

        .t2 {
          animation-name: t2-still;
        }

        @keyframes t2-still {
          0%,
          72% {
            opacity: 0;
          }
          75%,
          100% {
            opacity: 1;
          }
        }

        .out,
        .meta,
        .clock,
        .fail,
        .t1,
        .t2,
        .label > span {
          animation-duration: calc(var(--t) * 1.5);
        }
      }
    </style>
  </head>
  <body>
    <div
      class="card"
      role="img"
      aria-label="A sent message waits with a clock, then fails: the bubble dims in place and a small rust mark reads Not delivered, Retry; Retry is pressed, the same clock returns, and the message goes through to sent and then delivered"
    >
      <div class="head"><b>Maya Okafor</b><span>Direct message</span></div>
      <div class="thread">
        <div class="in">Running five late?</div>
        <div class="out">On the train, ten mins</div>
        <div class="meta">
          <span class="glyph" aria-hidden="true">
            <svg class="clock" viewBox="0 0 17 12">
              <circle cx="11" cy="6" r="4.75" />
              <path class="hand" d="M11 6 V3" />
            </svg>
            <svg viewBox="0 0 17 12">
              <g class="fail">
                <circle cx="11" cy="6" r="5" />
                <path d="M11 3.6 V6.6 M11 8.5 V8.55" />
              </g>
              <path class="t1" d="M1 6.5 L4.5 10 L11 2" />
              <path class="t2" d="M8 9 L9 10 L15.5 2" />
            </svg>
          </span>
          <span class="label">
            <span class="l-sending">Sending</span>
            <span class="l-fail">Not delivered · <span class="retry">Retry</span></span>
            <span class="l-sent">Sent</span>
            <span class="l-delivered">Delivered</span>
          </span>
        </div>
      </div>
    </div>
  </body>
</html>