kitbash Sign in Connect agent
Components

Cut-letter plate

A cast plate drawn with SVG grain, carrying a date, a place and a street name cut into it; the light follows the pointer and the letter walls turn with it.

Part of the style

Inscribed Glyph Night

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500&display=swap");
:root {
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}
</style>

<section class="tablet" aria-label="A street name cast in a plate">
  <div class="tablet__stage">
    <div class="tablet__plate">
      <svg class="tablet__grain" aria-hidden="true" preserveAspectRatio="none" viewBox="0 0 800 400">
        <filter id="tablet-grain" x="0" y="0" width="100%" height="100%">
          <feTurbulence type="fractalNoise" baseFrequency="0.008 0.05" numOctaves="4" seed="11" result="veins"/>
          <feColorMatrix type="saturate" values="0"/>
          <feComponentTransfer>
            <feFuncA type="table" tableValues="0.15 0.5"/>
          </feComponentTransfer>
        </filter>
        <filter id="tablet-pits" x="0" y="0" width="100%" height="100%">
          <feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="3"/>
          <feColorMatrix type="saturate" values="0"/>
          <feComponentTransfer>
            <feFuncA type="table" tableValues="0 0.18"/>
          </feComponentTransfer>
        </filter>
        <rect width="800" height="400" filter="url(#tablet-grain)"/>
        <rect width="800" height="400" filter="url(#tablet-pits)"/>
      </svg>
      <span class="tablet__sheen" aria-hidden="true"></span>
      <p class="tablet__number tablet__cut">1931–71</p>
      <p class="tablet__place tablet__cut">Ashby</p>
      <p class="tablet__street tablet__cut">Bellhouse Row</p>
    </div>
  </div>
  <p class="tablet__caption">
    <span class="tablet__caption-place">BELLHOUSE ROW, Ashby</span>
    <span class="tablet__caption-sub">The lane behind the first foundry</span>
  </p>
</section>

<style>
  .tablet {
    position: relative;
    display: grid;
    gap: var(--space-l);
    padding: var(--space-xl) var(--edge) var(--space-l);
    background: var(--paper);
    color: var(--ink);
  }
  .tablet__stage {
    display: grid;
    place-items: center;
    padding: var(--space-l) 0;
  }
  .tablet__plate {
    --lx: 0;
    --ly: 1;
    --mx: 30%;
    --my: 20%;
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(860px, 100%);
    aspect-ratio: 2 / 1;
    padding: 2.4% 3.2%;
    overflow: hidden;
    border-radius: var(--radius-l);
    background: linear-gradient(160deg, var(--plate-light), var(--plate) 55%, var(--plate-deep));
    box-shadow: 0 40px 80px var(--stone-dark);
    container-type: inline-size;
  }
  .tablet__grain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
  }
  .tablet__sheen {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx) var(--my), var(--stone-light), transparent 55%);
    mix-blend-mode: soft-light;
    transition: background-position var(--slow) var(--ease);
  }
  .tablet__cut {
    position: relative;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    color: var(--stone-fill);
    /* A V-cut letter: the wall facing the light is dark, the far wall catches it. */
    text-shadow:
      calc(var(--lx) * -0.012em) calc(var(--ly) * -0.012em) 0 var(--stone-dark),
      calc(var(--lx) * 0.018em) calc(var(--ly) * 0.018em) 0.01em var(--stone-light);
    transition: text-shadow var(--quick) var(--ease);
  }
  .tablet__number {
    font-size: 4.2cqi;
  }
  .tablet__place {
    align-self: center;
    justify-self: center;
    font-size: 7.5cqi;
  }
  .tablet__street {
    justify-self: center;
    font-size: 9.4cqi;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .tablet__caption {
    display: grid;
    margin: 0;
    font-size: var(--text-s);
    line-height: 1.5;
  }
  .tablet__caption-sub {
    color: var(--ink-mid);
  }
</style>

<script>
(() => {
  for (const root of document.querySelectorAll('.tablet')) {
    const plate = root.querySelector('.tablet__plate');
    if (matchMedia('(prefers-reduced-motion: reduce)').matches) continue;
    // The light follows the pointer: the sheen moves to it and the cut letters' walls turn away from it.
    root.addEventListener('pointermove', (event) => {
      const box = plate.getBoundingClientRect();
      const x = (event.clientX - box.left) / box.width;
      const y = (event.clientY - box.top) / box.height;
      plate.style.setProperty('--mx', (x * 100).toFixed(1) + '%');
      plate.style.setProperty('--my', (y * 100).toFixed(1) + '%');
      plate.style.setProperty('--lx', (0.5 - x).toFixed(2) * 2);
      plate.style.setProperty('--ly', (0.5 - y).toFixed(2) * 2);
    });
    root.addEventListener('pointerleave', () => {
      for (const name of ['--mx', '--my', '--lx', '--ly']) plate.style.removeProperty(name);
    });
  }
})();
</script>

Similar components

Captioned film still

Captioned film still

Bleed

Bleed

Light trail statement

Light trail statement

Grain player

Grain player

Record button preview

Record button preview

Edge-to-edge plate

Edge-to-edge plate

Open plate

Open plate

Framed slideshow

Framed slideshow