All effectsPlay & loop

Sheen Text

扫光文字

A narrow strip of light sweeps across the strokes of a word.

Play the demo to sweep light across the text

Where to use it

Place a brief accent on a headline, product name, or short slogan. Make the base text readable at every point in the sweep. Keep long reading areas free of repeated motion.

Practical example

A watchmaker accents a collection name with a narrow highlight that passes through the letterforms on demand.

Also called

  • Shiny Text
  • Text Shine

AI prompt

Add Sheen Text to [headline]. A narrow specular highlight travels across the glyphs on a loop or on hover, using the existing typeface. Pause the sweep for reduced motion.

Example code

Save the standalone HTML as a file and open it in your browser. It uses the same code as the preview.

View HTML
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sheen Text</title>
  <style>
    :root {
      color-scheme: dark;
      --demo-bg: #171629;
      --demo-ink: #f8f5ff;
      --demo-accent: #b9a6ff;
      --demo-muted: #bfbbd3;
      font-family: system-ui, sans-serif;
      color: var(--demo-ink);
      background: var(--demo-bg);
    }

    *, *::before, *::after { box-sizing: border-box; }
    body { margin: 0; min-width: 0; }
    button, input { font: inherit; }

    .demo {
      display: grid;
      place-items: center;
      align-content: center;
      min-height: 100vh;
      padding: 14px;
      overflow: hidden;
      background: radial-gradient(ellipse at 50% 24%, #28233f, var(--demo-bg) 78%);
    }

    .demo-button {
      border: 1px solid #ffffff3d;
      border-radius: 7px;
      background: #ffffff12;
      color: var(--demo-ink);
      padding: 6px 11px;
      font-size: 12px;
      cursor: pointer;
    }

    :focus-visible {
      outline: 2px solid var(--demo-accent);
      outline-offset: 3px;
    }

    .demo { background: radial-gradient(ellipse at 50% 45%, #3c3026, #1a1715 77%); }
    .motion-example { max-width: 100%; }
    .sheen-type {
      margin: 0;
      color: #d2a586;
      font: 400 clamp(29px, 14vw, 72px)/1.2 Georgia, serif;
      letter-spacing: -.065em;
    }
    @supports (background-clip: text) {
      .sheen-type {
        color: transparent;
        background: linear-gradient(102deg, #af8c75 0 38%, #ffd2a6 47%, #fff5d1 50%, #d9ad8d 54%, #b28b72 64% 100%) 49% 0 / 235% 100%;
        background-clip: text;
        animation: sweep 2.6s cubic-bezier(.4, 0, .36, 1) infinite;
        animation-delay: -1s;
      }
    }
    @keyframes sweep {
      0%, 8% { background-position: 100% 0; }
      73%, 100% { background-position: 0 0; }
    }
    @media (forced-colors: active) { .sheen-type { color: CanvasText; background: none; } }

    .motion-example { display: grid; place-items: center; gap: 12px; }
    .motion-example [data-motion] { animation-play-state: paused; }
    .motion-example[data-playing] [data-motion] { animation-play-state: running; }
    @media (prefers-reduced-motion: reduce) {
      .motion-example [data-motion] { animation: none; }
      .motion-example button { display: none; }
    }
  </style>
</head>
<body>
  <main class="demo">
    <div class="motion-example">
      <p class="sheen-type" data-motion>Afterglow</p>
      <button class="demo-button" type="button" data-testid="effect-demo-loop-toggle">Play demo</button>
    </div>
  </main>
  <script>
    const example = document.querySelector('.motion-example');
    const toggle = example.querySelector('button');
    toggle.addEventListener('click', () => {
      const playing = example.toggleAttribute('data-playing');
      toggle.textContent = playing ? "Pause demo" : "Play demo";
    });
  </script>
</body>
</html>

Original example by UI Skills