kitbash Sign in Connect agent
Components

Kraft split hero

The plain grotesk sentence with a small drawing set inline on the white half, and the kraft panel on the other with a tilted print that changes every few seconds under a dark caption button.

Part of the style

Kraft Panel Split

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #e9e6de;
  --ink-soft: #61625b;
  --paper: #21221c;
  --paper-warm: #24251f;
  --field: #2a2b25;
  --stone: #3b3c36;
  --kraft-deep: #b6b3ab;
  --veil: rgba(233, 230, 222, 0.5);
  --veil-soft: rgba(233, 230, 222, 0.2);
  --paper-glass: rgba(33, 34, 28, 0.52);
  --night: #e5e2da;
  --night-ink: #cdcac2;
  --line: rgba(233, 230, 222, 0.08);
  --kraft: #77604e;
}
</style>

<section class="split" aria-label="Introduction">
  <div class="split__side">
    <h1 class="split__title">
      Find quiet
      <svg class="split__glyph" viewBox="0 0 40 40" width="40" height="40" aria-hidden="true">
        <path d="M9 30V17.5c0-3.2 2.4-5.2 5.4-5.2h11.2c3 0 5.4 2 5.4 5.2V30" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/>
        <path d="M6.2 21.4h5v8.2M33.8 21.4h-5v8.2" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/>
        <path d="M11.2 24.6h17.6" stroke="currentColor" stroke-width="1.4"/>
        <path d="M8.6 30v3.2M31.4 30v3.2" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
        <path d="M14 16.4c2.4 1 9.6 1 12 0" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/>
        <path d="M20.6 6.2c1.2 1.4 1.5 2.4 1 3.2-.3.5-.7.7-1 .7s-.8-.2-1-.7c-.4-.8-.1-1.8 1-3.2z" fill="currentColor"/>
      </svg>
      rooms<br> to read, look and linger.
    </h1>
    <div class="split__foot">
      <p class="split__note">Two hundred and twelve rooms, chosen by people who sat in them.</p>
      <a class="split__more" href="#">Explore the index</a>
    </div>
  </div>

  <div class="split__panel">
    <div class="split__stage">
      <figure class="split__print is-current" style="--tilt: -2.4deg">
        <img class="split__img" src="assets/grey-door-room.jpg" alt="A grey room with a white bed and a curtained window" width="966" height="1200">
      </figure>
      <figure class="split__print" style="--tilt: 1.8deg">
        <img class="split__img" src="assets/sunlit-parlour.jpg" alt="Sunlight falling across a pale parlour wall above a sofa" width="1200" height="986">
      </figure>
      <figure class="split__print" style="--tilt: -1deg">
        <img class="split__img" src="assets/entrance-hall.jpg" alt="A hall with painted walls and a curving staircase" width="800" height="772">
      </figure>
    </div>
    <a class="split__caption" href="#">
      <svg class="split__arrow" viewBox="0 0 20 14" width="20" height="14" aria-hidden="true"><path d="M1 3.5h9.5a3 3 0 0 1 0 6H6m0 0 2.4-2.4M6 9.5l2.4 2.4" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
      <span class="split__words">
        <span class="split__label is-current">Rooms with one window</span>
        <span class="split__label">Afternoon parlours</span>
        <span class="split__label">Halls worth the stairs</span>
      </span>
    </a>
  </div>
</section>

<style>
  .split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: clamp(560px, 56vw, 820px);
  }
  .split__side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) var(--edge);
  }
  .split__title {
    margin: auto 0 0;
    max-width: 14em;
    font-size: var(--display);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.015em;
  }
  .split__glyph {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0 0.06em;
    vertical-align: -0.12em;
  }
  .split__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-m);
    margin-top: auto;
    font-size: var(--text-s);
  }
  .split__note {
    margin: 0;
    max-width: 24em;
    color: var(--ink-soft);
    line-height: 1.2;
  }
  .split__more {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--pill);
    background: var(--field);
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    transition: background var(--quick) var(--ease);
  }
  .split__more:hover { background: var(--stone); }

  .split__panel {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: calc(var(--bar-height) + var(--space-l)) var(--edge) 120px;
    background-color: var(--kraft);
    /* paper fibre drawn as noise, multiplied into the kraft colour */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.17 0 0 0 0 0.08 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .split__stage {
    position: relative;
    width: min(64%, 340px);
    aspect-ratio: 4 / 5.4;
  }
  .split__print {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transform: rotate(0deg) scale(0.96);
    transition: opacity var(--fade) var(--ease), transform var(--fade) var(--spring);
  }
  .split__print.is-current {
    opacity: 1;
    transform: rotate(var(--tilt)) scale(1);
  }
  .split__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: var(--shadow-print);
  }
  .split__caption {
    position: absolute;
    left: 50%;
    bottom: var(--space-xl);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    min-width: 240px;
    padding: 0 24px;
    transform: translateX(-50%);
    border-radius: var(--radius-s);
    background: var(--kraft-deep);
    color: var(--paper);
    font-size: var(--text-s);
    font-weight: 500;
    text-decoration: none;
    transition: background var(--quick) var(--ease);
  }
  .split__caption:hover { background: var(--ink); }
  .split__caption:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
  .split__arrow { flex: none; color: var(--paper-glass); }
  .split__words { display: grid; }
  .split__label {
    grid-area: 1 / 1;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--quick) var(--ease), transform 180ms var(--spring);
  }
  .split__label.is-current { opacity: 1; transform: none; }

  @media (max-width: 56rem) {
    .split {
      grid-template-columns: 1fr;
      min-height: 0;
      padding: 0 var(--space-s);
    }
    .split__side,
    .split__panel { grid-area: 1 / 1; }
    .split__panel {
      min-height: clamp(560px, 150vw, 720px);
      padding: var(--space-xl) var(--edge) 128px;
      border-radius: 0 0 var(--radius-l) var(--radius-l);
    }
    .split__stage { width: min(70%, 300px); }
    .split__side {
      position: relative;
      z-index: 1;
      padding: 0 var(--edge) 128px;
      color: var(--paper);
      text-align: center;
      pointer-events: none;
    }
    .split__title {
      margin: auto;
      text-shadow: 0 1px 18px var(--veil-soft);
    }
    .split__foot { display: none; }
    .split__caption {
      left: var(--edge);
      right: var(--edge);
      justify-content: center;
      min-width: 0;
      transform: none;
      border-radius: var(--pill);
    }
  }
</style>

<script>
  (() => {
    const still = window.matchMedia('(prefers-reduced-motion: reduce)');
    for (const root of document.querySelectorAll('.split')) {
      const prints = [...root.querySelectorAll('.split__print')];
      const labels = [...root.querySelectorAll('.split__label')];
      if (prints.length < 2) continue;
      const hold = parseFloat(getComputedStyle(root).getPropertyValue('--hold')) || 4200;
      let index = 0;
      let timer = 0;
      let visible = false;
      const show = (next) => {
        index = next % prints.length;
        prints.forEach((print, i) => print.classList.toggle('is-current', i === index));
        labels.forEach((label, i) => label.classList.toggle('is-current', i === index));
      };
      const stop = () => { clearInterval(timer); timer = 0; };
      const start = () => {
        if (timer || still.matches || !visible) return;
        timer = setInterval(() => show(index + 1), hold);
      };
      new IntersectionObserver(([entry]) => {
        visible = entry.isIntersecting;
        visible ? start() : stop();
      }).observe(root);
      still.addEventListener('change', () => { stop(); start(); });
    }
  })();
</script>

Similar components

Night water statement

Night water statement

Fog hero with fluid blob

Fog hero with fluid blob

Stage

Stage

Hero with editor window

Hero with editor window

Film reel

Film reel

Concertina hero

Concertina hero

Mark and standfirst

Mark and standfirst

Pill-stuck hero

Pill-stuck hero