kitbash Sign in Connect agent
Components

Tile ring hero

A white opening screen: the headline split to both sides of a black stage where twelve rounded picture tiles orbit a small label.

Part of the style

Tile Ring Blackroom

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

Preview

Code
<section class="hero">
  <h1 class="hero__title">
    <span class="hero__side hero__side--left">Rare seeds,</span>
    <span class="hero__stage">
      <span class="hero__ring">
        <img class="hero__tile" style="--i:0" src="assets/poppies-daisies.jpg" alt="Poppies and daisies in a jug" width="800" height="636">
        <img class="hero__tile" style="--i:1" src="assets/beach.jpg" alt="Boats on a beach under cloud" width="800" height="591">
        <img class="hero__tile" style="--i:2" src="assets/apples.jpg" alt="A bowl of apples seen from above" width="598" height="800">
        <img class="hero__tile" style="--i:3" src="assets/poppy-field.jpg" alt="A poppy field below poplars" width="800" height="520">
        <img class="hero__tile" style="--i:4" src="assets/sunflowers.jpg" alt="Two sunflower heads in a vase" width="617" height="800">
        <img class="hero__tile" style="--i:5" src="assets/pears-lemons.jpg" alt="Grapes, pears and lemons on a cloth" width="800" height="662">
        <img class="hero__tile" style="--i:6" src="assets/harbour.jpg" alt="A harbour under a yellow sky" width="800" height="588">
        <img class="hero__tile" style="--i:7" src="assets/apples-grapes.jpg" alt="Apples and grapes on a white cloth" width="800" height="640">
        <img class="hero__tile" style="--i:8" src="assets/poppies-daisies.jpg" alt="" width="800" height="636">
        <img class="hero__tile" style="--i:9" src="assets/poppy-field.jpg" alt="" width="800" height="520">
        <img class="hero__tile" style="--i:10" src="assets/apples.jpg" alt="" width="598" height="800">
        <img class="hero__tile" style="--i:11" src="assets/beach.jpg" alt="" width="800" height="591">
      </span>
      <span class="hero__label">Swap shelf <sup class="hero__label-count">12</sup></span>
    </span>
    <span class="hero__side hero__side--right">swapped by post</span>
  </h1>
  <div class="hero__foot">
    <p class="hero__lead">A growing library of 212 open-pollinated seeds, each with a sowing card, a grower's note and a packet you send back next autumn.</p>
    <a class="hero__button" href="#">Browse the shelf <span class="hero__arrow" aria-hidden="true"></span></a>
    <span class="hero__scroll" aria-hidden="true">↓ Scroll to sow</span>
  </div>
</section>

<style>
  .hero {
    display: grid;
    align-content: space-between;
    gap: var(--space-l);
    min-height: clamp(560px, 50vw, 720px);
    padding: var(--space-l) var(--edge) var(--edge);
    background: var(--white);
    color: var(--ink);
  }
  .hero__title {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-m);
    margin: 0;
    font: var(--weight) var(--text-l)/1.2 var(--font-display);
    letter-spacing: var(--track-tight);
  }
  .hero__side--right { text-align: right; }
  .hero__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(300px, 34vw, 480px);
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: var(--radius-s);
    background: var(--night);
    color: var(--white);
  }
  .hero__ring {
    position: absolute;
    inset: 0;
  }
  .hero__tile {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-m);
    --angle: calc(var(--i) * 30deg);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-200%) rotate(calc(var(--angle) * -1));
    animation: hero-orbit var(--orbit) linear infinite;
  }
  .hero__tile:nth-child(3n) { width: 10%; }
  .hero__tile:nth-child(4n + 1) { border-radius: 50% 50% var(--radius-s) var(--radius-s); }
  .hero__label {
    position: relative;
    font-size: 15px;
  }
  .hero__label-count { color: var(--ash); font-size: 11px; }
  .hero__stage:hover .hero__tile,
  .hero.is-off .hero__tile { animation-play-state: paused; }
  @keyframes hero-orbit {
    to { transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateY(-200%) rotate(calc(var(--angle) * -1 - 360deg)); }
  }

  .hero__foot {
    display: grid;
    grid-template-columns: minmax(0, 300px) 1fr;
    align-items: end;
    gap: var(--space-m) var(--space-l);
  }
  .hero__lead {
    grid-column: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
  }
  .hero__button {
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    min-height: var(--control);
    padding: 0 26px;
    border-radius: var(--radius-pill);
    background: var(--night);
    color: var(--white);
    font: var(--weight) var(--text-s)/1 var(--font-mono);
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color var(--medium) ease, color var(--medium) ease;
  }
  .hero__button:hover,
  .hero__button:focus-visible { background: var(--lime); color: var(--ink); outline: none; }
  .hero__arrow {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid currentColor;
  }
  .hero__scroll {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    color: var(--ash);
    font: var(--weight) var(--text-xs)/1 var(--font-mono);
    text-transform: uppercase;
  }

  @media (max-width: 760px) {
    .hero { min-height: 0; padding-top: var(--space-xl); }
    .hero__title {
      grid-template-columns: 1fr;
      justify-items: center;
      gap: 0;
      font-size: clamp(40px, 11vw, 64px);
      line-height: var(--leading-tight);
      text-align: center;
    }
    .hero__side--right { text-align: center; }
    .hero__stage { order: 3; width: 100%; margin-top: var(--space-l); }
    .hero__foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .hero__lead { font-size: var(--text-m); }
    .hero__button { justify-self: center; }
    .hero__scroll { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero__tile { animation: none; }
  }
</style>

<script>
(() => {
  const watch = new IntersectionObserver((entries) => {
    for (const entry of entries) entry.target.classList.toggle('is-off', !entry.isIntersecting);
  });
  for (const root of document.querySelectorAll('.hero')) watch.observe(root);
})();
</script>

Similar components

Grey stage

Grey stage

Numbered plate

Numbered plate

Statement with picture trail

Statement with picture trail

Threaded drag board

Threaded drag board

Drifting oval field

Drifting oval field

Drifting print field

Drifting print field

Portrait lineup

Portrait lineup

Framed still reel

Framed still reel