kitbash Sign in Connect agent
Components

Swatch service tiles

A headline and short paragraph beside a 3 by 2 grid of flat colour tiles, each with a white glyph and a label.

Part of the style

Swatch Tile Console

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #0c1218;
  --paper: #429ae3;
  --mist: #3f92d7;
  --graphite: #172e3f;
  --smoke: #052a41;
  --ink-soft: #4b78a0;
  --ink-faint: #4c89be;
  --line: #3c88c8;
  --line-on-field: rgba(66, 154, 227, 0.28);
  --scrim: rgba(12, 18, 24, 0.62);
  --scrim-soft: rgba(12, 18, 24, 0.22);
  --swatch-blue: #4a86b7;
  --swatch-violet: #4688bd;
  --field: #5d7e97;
  --field-deep: #4f6a7f;
  --swatch-lime: #4a86b7;
  --swatch-red: #698aa3;
}
</style>

<section class="tiles">
  <div class="tiles__intro">
    <h2 class="tiles__title">Everything a boat needs, handled under one roof.</h2>
    <p class="tiles__text">Haul-out, hull, rigging, engines, sails, winter storage and the monthly check, for dinghies, yachts and working boats. One yard owns the whole job, from the first survey to every season after launch.</p>
  </div>

  <ul class="tiles__grid">
    <li class="tiles__item tiles__item--lime">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><path d="M4 24h32l-5 9H9z" /><path d="M20 4v18M20 5l11 15H20z" /></svg>
        <span class="tiles__label">Hull repair</span>
      </a>
    </li>
    <li class="tiles__item tiles__item--blue">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><path d="M3 16c4-5 7-5 11 0s7 5 11 0 7-5 12 0v6c-5-5-8-5-12 0s-7 5-11 0-7-5-11 0z" /><path d="M3 28c4-5 7-5 11 0s7 5 11 0 7-5 12 0v6c-5-5-8-5-12 0s-7 5-11 0-7-5-11 0z" /></svg>
        <span class="tiles__label">Sea trials</span>
      </a>
    </li>
    <li class="tiles__item tiles__item--ink">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><circle cx="20" cy="20" r="15" /><circle class="tiles__glyph-cut" cx="20" cy="20" r="6" /><path class="tiles__glyph-cut" d="M19 5h2v9h-2zM19 26h2v9h-2zM5 19h9v2H5zM26 19h9v2h-9z" /></svg>
        <span class="tiles__label">Engines and drives</span>
      </a>
    </li>
    <li class="tiles__item tiles__item--red">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><path d="M8 4 34 30H8z" /><path d="M6 33h28v3H6z" /></svg>
        <span class="tiles__label">Sail loft</span>
      </a>
    </li>
    <li class="tiles__item tiles__item--violet">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><path d="M17 3h6v6h-6zM18.5 9h3v22h-3z" /><path d="M8 22c0 8 5 13 12 13s12-5 12-13l-4 3c0 4-3 7-8 7s-8-3-8-7z" /><path d="M11 13h18v3H11z" /></svg>
        <span class="tiles__label">Moorings and storage</span>
      </a>
    </li>
    <li class="tiles__item tiles__item--graphite">
      <a class="tiles__link" href="#">
        <svg class="tiles__glyph" viewBox="0 0 40 40" aria-hidden="true"><path d="M23 2 8 23h11l-3 15 16-22H21z" /></svg>
        <span class="tiles__label">Electrics and refits</span>
      </a>
    </li>
  </ul>
</section>

<style>
  .tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-xl) var(--gap);
    padding: 84px var(--edge) var(--section-space);
  }
  .tiles__title {
    max-width: 12em;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--display-m);
    font-weight: 400;
    line-height: 1;
    letter-spacing: var(--track-display);
    text-wrap: balance;
  }
  .tiles__text {
    max-width: 40em;
    margin: var(--space-l) 0 0;
    font-size: var(--text-s);
    line-height: 1.36;
  }

  .tiles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .tiles__item {
    --tile: var(--graphite);
    opacity: 0;
    translate: 0 14px;
    transition: opacity var(--slow) var(--ease), translate var(--slow) var(--ease);
    transition-delay: calc(var(--order, 0) * 70ms);
  }
  .tiles.is-seen .tiles__item {
    opacity: 1;
    translate: 0 0;
  }
  .tiles__item--lime { --tile: var(--swatch-lime); }
  .tiles__item--blue { --tile: var(--swatch-blue); }
  .tiles__item--ink { --tile: var(--ink); }
  .tiles__item--red { --tile: var(--swatch-red); }
  .tiles__item--violet { --tile: var(--swatch-violet); }
  .tiles__item--graphite { --tile: var(--graphite); }

  .tiles__link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-l);
    min-height: 98px;
    height: 100%;
    padding: 14px 15px 15px;
    border-radius: var(--radius);
    background: var(--tile);
    color: var(--paper);
    font-size: var(--text-s);
    text-decoration: none;
    overflow: hidden;
  }
  .tiles__link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    opacity: 0;
    transition: opacity var(--quick) var(--ease);
  }
  .tiles__link:hover::after,
  .tiles__link:focus-visible::after {
    opacity: 0.12;
  }
  .tiles__link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }
  .tiles__glyph {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    fill: var(--paper);
    transition: transform var(--quick) var(--ease);
  }
  .tiles__glyph-cut {
    fill: var(--tile);
  }
  .tiles__link:hover .tiles__glyph {
    transform: translateY(-3px) rotate(-6deg);
  }
  .tiles__label {
    position: relative;
    z-index: 1;
    line-height: 1.2;
  }

  @media (max-width: 960px) {
    .tiles {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 600px) {
    .tiles__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tiles__link {
      min-height: 88px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .tiles__item {
      opacity: 1;
      translate: none;
      transition: none;
    }
  }
</style>

<script>
  (() => {
    const seen = new IntersectionObserver((entries) => {
      for (const entry of entries) {
        if (!entry.isIntersecting) continue;
        entry.target.classList.add('is-seen');
        seen.unobserve(entry.target);
      }
    }, { threshold: 0.15 });
    for (const root of document.querySelectorAll('.tiles')) {
      root.querySelectorAll('.tiles__item').forEach((item, order) => item.style.setProperty('--order', order));
      seen.observe(root);
    }
  })();
</script>

Similar components

Statement bento

Statement bento

Service canvas

Service canvas

Process cards on a string

Process cards on a string

Stepped service cards

Stepped service cards

Fanned feature cards

Fanned feature cards

Latest notes

Latest notes

Grey card rail

Grey card rail

Coming-soon card

Coming-soon card