Back to the library

Cadence — pairing blink

Variant: Pairing blink

A pairing light that asks with rhythm and answers with stillness. While searching it blinks amber at an even 600ms period, 50% duty with 30ms edges — faster than any resting state in the family, because a search is a question and should not be mistaken for a status. On the beat the keyboard answers, the blinking stops and the light comes up solid olive in 120ms; the label leaves in 90ms before "Connected" lands in 160ms, so the two words never share a frame. The colour change — which the rider on the now-line takes on the same frame — is the second signal, not the first: the move from square wave to flat line on the strip chart is what a colour-blind reader, or anyone watching from the corner of an eye, actually sees. Solid holds for about 2.3s, long enough to read as settled, before a short dark reset, during which "Pairing…" fades back in, loops the demo. Under reduced motion the chart becomes a static legend and the light keeps its pattern on a 1.6× slower clock, between 25% and 90% with 140ms edges instead of square ones. Use it for Bluetooth and device pairing, OAuth handoffs, and any connect step that waits on the other side.

statusindicatorpresencesuccesschartsvgloop

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>Cadence — pairing blink</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) 54%, transparent);
        --_hair: color-mix(in srgb, var(--slate) 9%, transparent);
        --_trace: color-mix(in srgb, var(--slate) 62%, transparent);
        --_rider: var(--clay);

        /* Clock — six 600ms blinks while searching, a
           2.4s solid once paired, then a short dark reset before the demo repeats. */
        --cycle: 6.4s;
        --t: calc(var(--cycle) / var(--speed));

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

      * {
        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(300px, calc(100vw - 32px));
        padding: clamp(14px, 4.5vw, 18px);
        border-radius: calc(14px * var(--round));
        background: var(--paper);
        box-shadow:
          0 0 0 1px var(--_hair),
          0 1px 2px var(--_hair);
      }

      .head {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      /* The lens is always drawn, so dark reads as off — not as missing. */
      .lens {
        position: relative;
        flex: none;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: color-mix(in srgb, var(--oat) 70%, var(--paper));
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--slate) 14%, transparent);
      }

      .led {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        opacity: 0;
        animation: var(--_led) var(--t) linear infinite;
      }

      .name {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        font-weight: 500;
        letter-spacing: -0.01em;
      }

      .state {
        display: grid;
        justify-items: end;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: -0.005em;
      }

      .state span {
        grid-area: 1 / 1;
      }

      .strip {
        display: block;
        width: 100%;
        height: auto;
        margin-top: 12px;
        border-radius: calc(6px * var(--round));
        background: color-mix(in srgb, var(--oat) 26%, var(--paper));
      }

      .grid line {
        stroke: var(--_hair);
        stroke-width: 1;
        vector-effect: non-scaling-stroke;
      }

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

      .trace {
        fill: none;
        stroke: var(--_trace);
        stroke-width: 1.4;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
      }

      .now {
        stroke: color-mix(in srgb, var(--slate) 22%, transparent);
        stroke-width: 1;
        stroke-dasharray: 2 2;
        vector-effect: non-scaling-stroke;
      }

      .rider {
        fill: var(--_rider);
        animation: ride var(--t) linear infinite;
      }

      /* Mask luminance only — the strip fades in from the left edge. */
      .fade-0 {
        stop-color: var(--paper);
        stop-opacity: 0;
      }

      .fade-1 {
        stop-color: var(--paper);
      }

      .foot {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 10px;
        font-size: 11.5px;
        color: var(--_muted);
        font-variant-numeric: tabular-nums;
      }

      .led.amber {
        --_led: seek;
        background: var(--clay);
        box-shadow: 0 0 7px 1px color-mix(in srgb, var(--clay) 55%, transparent);
      }

      .led.green {
        --_led: paired;
        background: var(--olive);
        box-shadow: 0 0 7px 1px color-mix(in srgb, var(--olive) 55%, transparent);
      }

      .state .s-seek {
        color: color-mix(in srgb, var(--clay-d) 80%, var(--slate));
        animation: label-seek var(--t) var(--ease-out) infinite;
      }

      .state .s-paired {
        color: color-mix(in srgb, var(--olive) 70%, var(--slate));
        opacity: 0;
        animation: label-paired var(--t) var(--ease-out) infinite;
      }

      /* The rider takes the light's colour on the same frame the light does. */
      .rider {
        animation:
          ride var(--t) linear infinite,
          rider-tint var(--t) step-end infinite;
      }

      /* The strip scrolls one cycle's width per cycle on the same clock as the
         light, so the level under the dashed "now" line is the light. */
      @keyframes scroll {
        from {
          transform: translateX(0);
        }
        to {
          transform: translateX(-217.6px);
        }
      }

      @keyframes seek {
        0% {
          opacity: 0;
        }
        0.469% {
          opacity: 1;
        }
        4.687% {
          opacity: 1;
        }
        5.156% {
          opacity: 0;
        }
        9.375% {
          opacity: 0;
        }
        9.844% {
          opacity: 1;
        }
        14.062% {
          opacity: 1;
        }
        14.531% {
          opacity: 0;
        }
        18.75% {
          opacity: 0;
        }
        19.219% {
          opacity: 1;
        }
        23.438% {
          opacity: 1;
        }
        23.906% {
          opacity: 0;
        }
        28.125% {
          opacity: 0;
        }
        28.594% {
          opacity: 1;
        }
        32.812% {
          opacity: 1;
        }
        33.281% {
          opacity: 0;
        }
        37.5% {
          opacity: 0;
        }
        37.969% {
          opacity: 1;
        }
        42.187% {
          opacity: 1;
        }
        42.656% {
          opacity: 0;
        }
        46.875% {
          opacity: 0;
        }
        47.344% {
          opacity: 1;
        }
        51.562% {
          opacity: 1;
        }
        52.031% {
          opacity: 0;
        }
        100% {
          opacity: 0;
        }
      }

      @keyframes paired {
        0% {
          opacity: 0;
        }
        56.25% {
          opacity: 0;
        }
        58.125% {
          opacity: 1;
        }
        93.75% {
          opacity: 1;
        }
        96.563% {
          opacity: 0;
        }
        100% {
          opacity: 0;
        }
      }

      @keyframes ride {
        0% {
          transform: translateY(0px);
        }
        0.469% {
          transform: translateY(-22px);
        }
        4.687% {
          transform: translateY(-22px);
        }
        5.156% {
          transform: translateY(0px);
        }
        9.375% {
          transform: translateY(0px);
        }
        9.844% {
          transform: translateY(-22px);
        }
        14.062% {
          transform: translateY(-22px);
        }
        14.531% {
          transform: translateY(0px);
        }
        18.75% {
          transform: translateY(0px);
        }
        19.219% {
          transform: translateY(-22px);
        }
        23.438% {
          transform: translateY(-22px);
        }
        23.906% {
          transform: translateY(0px);
        }
        28.125% {
          transform: translateY(0px);
        }
        28.594% {
          transform: translateY(-22px);
        }
        32.812% {
          transform: translateY(-22px);
        }
        33.281% {
          transform: translateY(0px);
        }
        37.5% {
          transform: translateY(0px);
        }
        37.969% {
          transform: translateY(-22px);
        }
        42.187% {
          transform: translateY(-22px);
        }
        42.656% {
          transform: translateY(0px);
        }
        46.875% {
          transform: translateY(0px);
        }
        47.344% {
          transform: translateY(-22px);
        }
        51.562% {
          transform: translateY(-22px);
        }
        52.031% {
          transform: translateY(0px);
        }
        56.25% {
          transform: translateY(0px);
        }
        58.125% {
          transform: translateY(-22px);
        }
        93.75% {
          transform: translateY(-22px);
        }
        96.563% {
          transform: translateY(0px);
        }
        100% {
          transform: translateY(0px);
        }
      }

      /* The old word leaves (90ms) before the new one lands (160ms), so the two
         states never share a frame. */
      @keyframes label-seek {
        0%,
        56.25% {
          opacity: 1;
        }
        57.656%,
        97.188% {
          opacity: 0;
        }
        100% {
          opacity: 1;
        }
      }

      @keyframes rider-tint {
        0% {
          fill: var(--clay);
        }
        56.25% {
          fill: var(--olive);
        }
        96.563% {
          fill: var(--clay);
        }
      }

      @keyframes label-paired {
        0%,
        57.656% {
          opacity: 0;
        }
        60.156%,
        93.75% {
          opacity: 1;
        }
        95.156%,
        100% {
          opacity: 0;
        }
      }

      @media (prefers-reduced-motion: reduce) {
        /* The rhythm is the information, so the light keeps it — slower and
           with a raised floor, so it never strobes. The chart stops scrolling
           and stays as a legend of the pattern; the rider goes. */
        .led.amber {
          animation-name: seek-soft;
          animation-duration: calc(var(--t) * 1.6);
        }

        .led.green {
          animation-name: paired-soft;
          animation-duration: calc(var(--t) * 1.6);
        }

        .scroll {
          animation: none;
        }

        .rider {
          display: none;
        }

        .state .s-seek,
        .state .s-paired {
          animation-duration: calc(var(--t) * 1.6);
        }

        @keyframes seek-soft {
          0% {
            opacity: 0.25;
          }
          2.188% {
            opacity: 0.9;
          }
          4.687% {
            opacity: 0.9;
          }
          6.875% {
            opacity: 0.25;
          }
          9.375% {
            opacity: 0.25;
          }
          11.563% {
            opacity: 0.9;
          }
          14.062% {
            opacity: 0.9;
          }
          16.25% {
            opacity: 0.25;
          }
          18.75% {
            opacity: 0.25;
          }
          20.937% {
            opacity: 0.9;
          }
          23.438% {
            opacity: 0.9;
          }
          25.625% {
            opacity: 0.25;
          }
          28.125% {
            opacity: 0.25;
          }
          30.312% {
            opacity: 0.9;
          }
          32.812% {
            opacity: 0.9;
          }
          35% {
            opacity: 0.25;
          }
          37.5% {
            opacity: 0.25;
          }
          39.688% {
            opacity: 0.9;
          }
          42.187% {
            opacity: 0.9;
          }
          44.375% {
            opacity: 0.25;
          }
          46.875% {
            opacity: 0.25;
          }
          49.063% {
            opacity: 0.9;
          }
          51.562% {
            opacity: 0.9;
          }
          53.75% {
            opacity: 0.25;
          }
          100% {
            opacity: 0.25;
          }
        }

        @keyframes paired-soft {
          0% {
            opacity: 0.25;
          }
          56.25% {
            opacity: 0.25;
          }
          58.438% {
            opacity: 0.9;
          }
          93.75% {
            opacity: 0.9;
          }
          97.5% {
            opacity: 0.25;
          }
          100% {
            opacity: 0.25;
          }
        }
      }
    </style>
  </head>
  <body>
    <div
      class="card"
      role="img"
      aria-label="A keyboard pairing light blinks amber at an even fast rhythm, six times, then holds steady in a second colour as the label changes from Pairing to Connected. A strip chart beneath shows the square blinks giving way to a flat high line."
    >
      <div class="head">
        <span class="lens" aria-hidden="true"
          ><i class="led amber"></i><i class="led green"></i
        ></span>
        <span class="name">Keyboard</span>
        <span class="state"
          ><span class="s-seek">Pairing…</span><span class="s-paired">Connected</span></span
        >
      </div>
      <svg class="strip" viewBox="0 0 200 36" aria-hidden="true">
        <defs>
          <clipPath id="past"><rect x="0" y="0" width="184" height="36" /></clipPath>
          <linearGradient id="fade-g" x1="0" x2="1">
            <stop class="fade-0" offset="0" />
            <stop class="fade-1" offset="0.22" />
          </linearGradient>
          <mask id="fade"><rect width="200" height="36" fill="url(#fade-g)" /></mask>
        </defs>
        <g class="grid">
          <line x1="0" x2="200" y1="30" y2="30" />
          <line x1="163.6" x2="163.6" y1="4" y2="30" />
          <line x1="143.2" x2="143.2" y1="4" y2="30" />
          <line x1="122.8" x2="122.8" y1="4" y2="30" />
          <line x1="102.4" x2="102.4" y1="4" y2="30" />
          <line x1="82" x2="82" y1="4" y2="30" />
          <line x1="61.6" x2="61.6" y1="4" y2="30" />
          <line x1="41.2" x2="41.2" y1="4" y2="30" />
          <line x1="20.8" x2="20.8" y1="4" y2="30" />
          <line x1="0.4" x2="0.4" y1="4" y2="30" />
        </g>
        <g clip-path="url(#past)" mask="url(#fade)">
          <g class="scroll">
            <path
              class="trace"
              d="M0 30 L7.2 30 L8.22 8 L17.4 8 L18.42 30 L27.6 30 L28.62 8 L37.8 8 L38.82 30 L48 30 L49.02 8 L58.2 8 L59.22 30 L68.4 30 L69.42 8 L78.6 8 L79.62 30 L88.8 30 L92.88 8 L170.4 8 L176.52 30 L184 30 L184 30 L185.02 8 L194.2 8 L195.22 30 L204.4 30 L205.42 8 L214.6 8 L215.62 30 L224.8 30 L225.82 8 L235 8 L236.02 30 L245.2 30 L246.22 8 L255.4 8 L256.42 30 L265.6 30 L266.62 8 L275.8 8 L276.82 30 L286 30 L287.02 8 L296.2 8 L297.22 30 L306.4 30 L310.48 8 L388 8 L394.12 30 L401.6 30"
            />
          </g>
        </g>
        <line class="now" x1="184" x2="184" y1="3" y2="33" />
        <circle class="rider" cx="184" cy="30" r="2.2" />
      </svg>
      <div class="foot"><span>Fast blink asks</span><span>Solid answers</span></div>
    </div>
  </body>
</html>

The variant family

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