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.
https://kitbash.me/components/swatch-tile-console/tiles/figma.html?palette=d08b7acfdadaa95b
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/swatch-tile-console/tiles/figma.html?palette=d08b7acfdadaa95b and pass that whole HTML document to the html_to_figma tool, so the part "Swatch service tiles" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--ink: #fcfefe;
--paper: #1f4d49;
--mist: #2b5652;
--graphite: #c7d3d3;
--smoke: #aabbbb;
--ink-soft: #617876;
--ink-faint: #5a7b77;
--line: #39605c;
--line-on-field: rgba(31, 77, 73, 0.28);
--scrim: rgba(252, 254, 254, 0.62);
--scrim-soft: rgba(252, 254, 254, 0.22);
--swatch-blue: #53756c;
--swatch-violet: #53776e;
--field: #5f8078;
--field-deep: #66837c;
--swatch-lime: #53756c;
--swatch-red: #53756c;
}
</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>