Back to the library

Typo nudge, hairline weight

Variant: Hairline

The lightest version of the typo nudge: a 1px underline, a faint field ring and an outlined chip that drops only 2px. Use it in dense forms or settings panels where several fields might carry hints at once and heavier marks would compete with each other. The timing is identical to the standard version, and only the marks get thinner, so the cue still arrives in 240ms but asks for very little attention.

formvalidationsuggestionsubtleinput

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>Typo nudge, hairline weight</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: 4s; /* the authored master loop */
  --t: calc(var(--cycle) / var(--speed));

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */

  --_stroke: 1px;
  --_ring: 1px;
  --_ring-peak: 0.35;
  --_tint: 0%;
  --_travel: 2px;
  --_chip-fill: 0%;
  --_chip-edge: 40%;
  --_chip-ink: var(--clay-d);
  --_muted: color-mix(in oklch, var(--slate) 58%, var(--paper));
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ivory);
  color: var(--slate);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.card {
  width: min(360px, 88vw);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(16px * var(--round));
  padding: clamp(16px, 5vw, 24px);
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(12px, 3.4vw, 13px);
  font-weight: 600;
  color: var(--_muted);
}

.field {
  position: relative;
  border: 1px solid var(--oat);
  border-radius: calc(10px * var(--round));
  padding: 12px 14px;
  font-size: clamp(15px, 4.2vw, 16px);
  background: var(--paper);
}

.field::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: var(--_ring) solid var(--clay);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: ring var(--t) infinite both;
}

.value { white-space: nowrap; }

.suspect {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.suspect::before,
.suspect::after {
  content: "";
  position: absolute;
  transform-origin: left center;
  transform: scaleX(0);
  animation: mark var(--t) infinite both;
}

.suspect::before {
  inset: -1px -2px;
  z-index: -1;
  background: color-mix(in oklch, var(--clay) var(--_tint), var(--paper));
  border-radius: calc(3px * var(--round));
}

.suspect::after {
  left: 0;
  right: 0;
  bottom: -3px;
  height: var(--_stroke);
  background: var(--clay);
  border-radius: 999px;
}

.hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--_muted);
}

.hint > * {
  opacity: 0;
  transform-origin: top left;
  animation: rise var(--t) infinite both;
}

/* 50ms behind the question: reads cause first, fix second. */
.hint .chip { animation-delay: calc(50ms / var(--speed)); }

.chip {
  font: inherit;
  font-weight: 600;
  color: var(--_chip-ink);
  background: color-mix(in oklch, var(--clay-d) var(--_chip-fill), var(--paper));
  border: 1px solid color-mix(in oklch, var(--clay) var(--_chip-edge), var(--paper));
  border-radius: 999px;
  padding: 4px 10px;
}

/* 4s loop: 1% = 40ms. Enter 240ms (10→16%), exit 180ms (82→86.5%). */
@keyframes mark {
  0%, 10% { transform: scaleX(0); opacity: 1; animation-timing-function: var(--ease-out); }
  16% { transform: scaleX(1); opacity: 1; }
  82% { transform: scaleX(1); opacity: 1; animation-timing-function: var(--ease-out); }
  86.5% { transform: scaleX(1); opacity: 0; }
  100% { transform: scaleX(0); opacity: 0; }
}

@keyframes ring {
  0%, 10% { opacity: 0; animation-timing-function: var(--ease-out); }
  16% { opacity: var(--_ring-peak); }
  82% { opacity: var(--_ring-peak); animation-timing-function: var(--ease-out); }
  86.5%, 100% { opacity: 0; }
}

@keyframes rise {
  0%, 15% { opacity: 0; transform: translateY(calc(var(--_travel) * -1)) scale(0.97); animation-timing-function: var(--ease-out); }
  21% { opacity: 1; transform: none; }
  82% { opacity: 1; transform: none; animation-timing-function: var(--ease-out); }
  86.5% { opacity: 0; transform: translateY(calc(var(--_travel) * -0.5)) scale(0.985); }
  100% { opacity: 0; transform: translateY(calc(var(--_travel) * -1)) scale(0.97); }
}

@keyframes fade-mark {
  0%, 10% { opacity: 0; animation-timing-function: var(--ease-out); }
  16%, 82% { opacity: 1; animation-timing-function: var(--ease-out); }
  86.5%, 100% { opacity: 0; }
}

@keyframes fade-hint {
  0%, 15% { opacity: 0; animation-timing-function: var(--ease-out); }
  21%, 82% { opacity: 1; animation-timing-function: var(--ease-out); }
  86.5%, 100% { opacity: 0; }
}

@media (max-width: 380px) {
  .card { padding: 16px; }
  .field { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .field::after,
  .suspect::before,
  .suspect::after,
  .hint > * { animation-duration: calc(var(--t) * 2); }
  .suspect::before,
  .suspect::after { transform: none; animation-name: fade-mark; }
  .hint > * { transform: none; animation-name: fade-hint; }
  .hint .chip { animation-delay: calc(50ms / var(--speed)); }
}
</style>
</head>
<body>
  <div class="card">
    <span class="label">Email</span>
    <div class="field">
      <span class="value">jane@<span class="suspect">exmaple</span>.com</span>
    </div>
    <div class="hint">
      <span class="ask">Did you mean</span>
      <button class="chip" type="button">example.com</button>
    </div>
  </div>
</body>
</html>

The variant family

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