Back to the library

Cadence — activity flicker

Variant: Activity flicker

A drive activity light: dim and steady at 28% when ready, flicking to full for 90ms on each write — 20ms up, 40ms held, 30ms down. The writes are deliberately irregular, bunched into the first 2.1s and then gone, because the flicker is driven by traffic, not a clock; a regular flicker would read as a code. The dim floor matters as much as the flicks: it says "powered and idle", so the quiet stretch reads as ready rather than off. The label trails the light both ways: "Writing" lands with the first flick, and "Ready" waits 400ms past the last one — longer than any gap inside the burst, so a pause between writes never flips the word. On the strip chart the flicks are thin uneven spikes over a raised baseline, the shape of real I/O. Under reduced motion the chart freezes, and the flicks slow by 2× and only rise from 35% to 75%, so it never strobes. Use it for sync, upload and write activity, anywhere the honest signal is "something is happening right now".

statusindicatorpresenceprogresschartsvgloop

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 — activity flicker</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(--olive);

        /* Clock — ten write flickers bunched into the
           first 2.1s, then 1.1s of quiet at the dim floor. */
        --cycle: 3.2s;
        --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.green {
        --_led: flicker;
        background: var(--olive);
        box-shadow: 0 0 7px 1px color-mix(in srgb, var(--olive) 55%, transparent);
      }

      .state .s-busy {
        opacity: 0;
        animation: label-busy var(--t) var(--ease-out) infinite;
      }

      .state .s-idle {
        color: var(--_muted);
        animation: label-idle var(--t) var(--ease-out) 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(-147.2px);
        }
      }

      @keyframes flicker {
        0% {
          opacity: 0.28;
        }
        3.75% {
          opacity: 0.28;
        }
        4.375% {
          opacity: 1;
        }
        5.625% {
          opacity: 1;
        }
        6.562% {
          opacity: 0.28;
        }
        8.438% {
          opacity: 0.28;
        }
        9.063% {
          opacity: 1;
        }
        10.313% {
          opacity: 1;
        }
        11.25% {
          opacity: 0.28;
        }
        12.5% {
          opacity: 0.28;
        }
        13.125% {
          opacity: 1;
        }
        14.375% {
          opacity: 1;
        }
        15.312% {
          opacity: 0.28;
        }
        22.5% {
          opacity: 0.28;
        }
        23.125% {
          opacity: 1;
        }
        24.375% {
          opacity: 1;
        }
        25.313% {
          opacity: 0.28;
        }
        26.25% {
          opacity: 0.28;
        }
        26.875% {
          opacity: 1;
        }
        28.125% {
          opacity: 1;
        }
        29.062% {
          opacity: 0.28;
        }
        36.875% {
          opacity: 0.28;
        }
        37.5% {
          opacity: 1;
        }
        38.75% {
          opacity: 1;
        }
        39.688% {
          opacity: 0.28;
        }
        46.875% {
          opacity: 0.28;
        }
        47.5% {
          opacity: 1;
        }
        48.75% {
          opacity: 1;
        }
        49.688% {
          opacity: 0.28;
        }
        50.625% {
          opacity: 0.28;
        }
        51.25% {
          opacity: 1;
        }
        52.5% {
          opacity: 1;
        }
        53.438% {
          opacity: 0.28;
        }
        54.375% {
          opacity: 0.28;
        }
        55% {
          opacity: 1;
        }
        56.25% {
          opacity: 1;
        }
        57.188% {
          opacity: 0.28;
        }
        61.875% {
          opacity: 0.28;
        }
        62.5% {
          opacity: 1;
        }
        63.75% {
          opacity: 1;
        }
        64.687% {
          opacity: 0.28;
        }
        100% {
          opacity: 0.28;
        }
      }

      @keyframes ride {
        0% {
          transform: translateY(-6.16px);
        }
        3.75% {
          transform: translateY(-6.16px);
        }
        4.375% {
          transform: translateY(-22px);
        }
        5.625% {
          transform: translateY(-22px);
        }
        6.562% {
          transform: translateY(-6.16px);
        }
        8.438% {
          transform: translateY(-6.16px);
        }
        9.063% {
          transform: translateY(-22px);
        }
        10.313% {
          transform: translateY(-22px);
        }
        11.25% {
          transform: translateY(-6.16px);
        }
        12.5% {
          transform: translateY(-6.16px);
        }
        13.125% {
          transform: translateY(-22px);
        }
        14.375% {
          transform: translateY(-22px);
        }
        15.312% {
          transform: translateY(-6.16px);
        }
        22.5% {
          transform: translateY(-6.16px);
        }
        23.125% {
          transform: translateY(-22px);
        }
        24.375% {
          transform: translateY(-22px);
        }
        25.313% {
          transform: translateY(-6.16px);
        }
        26.25% {
          transform: translateY(-6.16px);
        }
        26.875% {
          transform: translateY(-22px);
        }
        28.125% {
          transform: translateY(-22px);
        }
        29.062% {
          transform: translateY(-6.16px);
        }
        36.875% {
          transform: translateY(-6.16px);
        }
        37.5% {
          transform: translateY(-22px);
        }
        38.75% {
          transform: translateY(-22px);
        }
        39.688% {
          transform: translateY(-6.16px);
        }
        46.875% {
          transform: translateY(-6.16px);
        }
        47.5% {
          transform: translateY(-22px);
        }
        48.75% {
          transform: translateY(-22px);
        }
        49.688% {
          transform: translateY(-6.16px);
        }
        50.625% {
          transform: translateY(-6.16px);
        }
        51.25% {
          transform: translateY(-22px);
        }
        52.5% {
          transform: translateY(-22px);
        }
        53.438% {
          transform: translateY(-6.16px);
        }
        54.375% {
          transform: translateY(-6.16px);
        }
        55% {
          transform: translateY(-22px);
        }
        56.25% {
          transform: translateY(-22px);
        }
        57.188% {
          transform: translateY(-6.16px);
        }
        61.875% {
          transform: translateY(-6.16px);
        }
        62.5% {
          transform: translateY(-22px);
        }
        63.75% {
          transform: translateY(-22px);
        }
        64.687% {
          transform: translateY(-6.16px);
        }
        100% {
          transform: translateY(-6.16px);
        }
      }

      /* The label trails the light both ways. "Writing" lands with the first
         flick, and "Ready" waits 400ms past the last one — longer than any gap
         inside the burst, so a pause between writes never flips the word. */
      @keyframes label-busy {
        0%,
        3.75% {
          opacity: 0;
        }
        8.75%,
        77.188% {
          opacity: 1;
        }
        80%,
        100% {
          opacity: 0;
        }
      }

      @keyframes label-idle {
        0%,
        0.938% {
          opacity: 1;
        }
        3.75%,
        80% {
          opacity: 0;
        }
        85%,
        100% {
          opacity: 1;
        }
      }

      @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.green {
          animation-name: flicker-soft;
          animation-duration: calc(var(--t) * 2);
        }

        .scroll {
          animation: none;
        }

        .rider {
          display: none;
        }

        .state .s-busy,
        .state .s-idle {
          animation-duration: calc(var(--t) * 2);
        }

        @keyframes flicker-soft {
          0% {
            opacity: 0.35;
          }
          3.75% {
            opacity: 0.35;
          }
          4.375% {
            opacity: 0.75;
          }
          5.625% {
            opacity: 0.75;
          }
          6.562% {
            opacity: 0.35;
          }
          8.438% {
            opacity: 0.35;
          }
          9.063% {
            opacity: 0.75;
          }
          10.313% {
            opacity: 0.75;
          }
          11.25% {
            opacity: 0.35;
          }
          12.5% {
            opacity: 0.35;
          }
          13.125% {
            opacity: 0.75;
          }
          14.375% {
            opacity: 0.75;
          }
          15.312% {
            opacity: 0.35;
          }
          22.5% {
            opacity: 0.35;
          }
          23.125% {
            opacity: 0.75;
          }
          24.375% {
            opacity: 0.75;
          }
          25.313% {
            opacity: 0.35;
          }
          26.25% {
            opacity: 0.35;
          }
          26.875% {
            opacity: 0.75;
          }
          28.125% {
            opacity: 0.75;
          }
          29.062% {
            opacity: 0.35;
          }
          36.875% {
            opacity: 0.35;
          }
          37.5% {
            opacity: 0.75;
          }
          38.75% {
            opacity: 0.75;
          }
          39.688% {
            opacity: 0.35;
          }
          46.875% {
            opacity: 0.35;
          }
          47.5% {
            opacity: 0.75;
          }
          48.75% {
            opacity: 0.75;
          }
          49.688% {
            opacity: 0.35;
          }
          50.625% {
            opacity: 0.35;
          }
          51.25% {
            opacity: 0.75;
          }
          52.5% {
            opacity: 0.75;
          }
          53.438% {
            opacity: 0.35;
          }
          54.375% {
            opacity: 0.35;
          }
          55% {
            opacity: 0.75;
          }
          56.25% {
            opacity: 0.75;
          }
          57.188% {
            opacity: 0.35;
          }
          61.875% {
            opacity: 0.35;
          }
          62.5% {
            opacity: 0.75;
          }
          63.75% {
            opacity: 0.75;
          }
          64.687% {
            opacity: 0.35;
          }
          100% {
            opacity: 0.35;
          }
        }
      }
    </style>
  </head>
  <body>
    <div
      class="card"
      role="img"
      aria-label="A backup drive light glows dimly and flickers bright in irregular bursts as data is written, with the label Writing, then stays dim and steady through a quiet stretch labelled Ready. A strip chart beneath shows the flickers as thin uneven spikes over a low baseline."
    >
      <div class="head">
        <span class="lens" aria-hidden="true"><i class="led green"></i></span>
        <span class="name">Backup drive</span>
        <span class="state"
          ><span class="s-busy">Writing</span><span class="s-idle">Ready</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="147.2" x2="147.2" y1="4" y2="30" />
          <line x1="110.4" x2="110.4" y1="4" y2="30" />
          <line x1="73.6" x2="73.6" y1="4" y2="30" />
          <line x1="36.8" x2="36.8" y1="4" y2="30" />
        </g>
        <g clip-path="url(#past)" mask="url(#fade)">
          <g class="scroll">
            <path
              class="trace"
              d="M0 23.84 L36.8 23.84 L36.8 23.84 L42.32 23.84 L43.24 8 L45.08 8 L46.46 23.84 L49.22 23.84 L50.14 8 L51.98 8 L53.36 23.84 L55.2 23.84 L56.12 8 L57.96 8 L59.34 23.84 L69.92 23.84 L70.84 8 L72.68 8 L74.06 23.84 L75.44 23.84 L76.36 8 L78.2 8 L79.58 23.84 L91.08 23.84 L92 8 L93.84 8 L95.22 23.84 L105.8 23.84 L106.72 8 L108.56 8 L109.94 23.84 L111.32 23.84 L112.24 8 L114.08 8 L115.46 23.84 L116.84 23.84 L117.76 8 L119.6 8 L120.98 23.84 L127.88 23.84 L128.8 8 L130.64 8 L132.02 23.84 L184 23.84 L184 23.84 L189.52 23.84 L190.44 8 L192.28 8 L193.66 23.84 L196.42 23.84 L197.34 8 L199.18 8 L200.56 23.84 L202.4 23.84 L203.32 8 L205.16 8 L206.54 23.84 L217.12 23.84 L218.04 8 L219.88 8 L221.26 23.84 L222.64 23.84 L223.56 8 L225.4 8 L226.78 23.84 L238.28 23.84 L239.2 8 L241.04 8 L242.42 23.84 L253 23.84 L253.92 8 L255.76 8 L257.14 23.84 L258.52 23.84 L259.44 8 L261.28 8 L262.66 23.84 L264.04 23.84 L264.96 8 L266.8 8 L268.18 23.84 L275.08 23.84 L276 8 L277.84 8 L279.22 23.84 L331.2 23.84"
            />
          </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>Flicker follows traffic</span><span>Dim = ready</span></div>
    </div>
  </body>
</html>

The variant family

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