Split hero
Sticky sidebar with wordmark, a canvas wireframe letter turning slowly and a numbered index with a travelling underline; content side with boxed navigation, two pills joined by a line and a light serif statement. On phones it stacks with a round menu button.
Part of the style
Wireframe Ledger
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/wireframe-ledger/hero/figma.html?palette=b62b7d635007a858&type=difference-deck
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/wireframe-ledger/hero/figma.html?palette=b62b7d635007a858&type=difference-deck and pass that whole HTML document to the html_to_figma tool, so the part "Split hero" 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 */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Fraunces:ital,opsz,wght@1,9..144,400..600&display=swap");
:root {
--paper: #e9e9e9;
--ink: #363736;
--ink-mid: rgba(54, 55, 54, 0.6);
--ink-soft: rgba(54, 55, 54, 0.45);
--rule: rgba(54, 55, 54, 0.16);
--rule-strong: #363736;
--mist: #dadad9;
--fog: #cacaca;
--sand: #d7d7d7;
--on-wine: #e9e9e9;
--wine: #04735f;
--signal: #198d75;
--font-display: "Fraunces", Georgia, serif;
--font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
--font-mark: "Fraunces", Georgia, serif;
}
</style>
<section class="hero">
<aside class="hero__side">
<div class="hero__bar">
<a class="hero__mark" href="#" aria-label="Keel, home">KEEL</a>
<button class="hero__round" type="button" aria-label="Back to top"><span class="hero__round-letter">K</span></button>
<button class="hero__burger" type="button" aria-label="Menu" aria-expanded="false"><span></span></button>
</div>
<div class="hero__stage">
<canvas class="hero__canvas" role="img" aria-label="Wireframe drawing of a block letter K, turning slowly"></canvas>
</div>
<nav class="hero__index" aria-label="Holdings">
<p class="hero__index-head"><span class="hero__tick" aria-hidden="true"></span>Holdings</p>
<ol class="hero__list">
<li><a class="hero__row is-active" href="#" aria-current="true"><span>01</span>Saltmarsh Ferries</a></li>
<li><a class="hero__row" href="#"><span>02</span>Dunlin Drydock</a></li>
<li><a class="hero__row" href="#"><span>03</span>The quiet harbour thesis</a></li>
</ol>
<span class="hero__underline" aria-hidden="true"></span>
</nav>
</aside>
<div class="hero__main">
<nav class="hero__nav" aria-label="Main">
<a class="hero__link is-current" href="#" aria-current="page">Holdings</a>
<a class="hero__link" href="#">People</a>
<a class="hero__link" href="#">Contact</a>
<a class="hero__link" href="#">Logbook</a>
</nav>
<div class="hero__copy">
<p class="hero__pills"><span class="hero__pill">Yard discipline</span><span class="hero__join" aria-hidden="true"></span><span class="hero__pill">Venture nerve</span></p>
<h1 class="hero__statement">Electric hulls will quietly rewrite the harbour. Keel buys working fleets and refits them for the next fifty years.</h1>
</div>
</div>
</section>
<style>
.hero {
display: grid;
grid-template-columns: var(--sidebar) minmax(0, 1fr);
min-height: clamp(36rem, 52vw, 50rem);
background: var(--paper);
color: var(--ink);
}
.hero__side {
position: sticky;
top: 0;
align-self: start;
display: grid;
grid-template-rows: auto minmax(12rem, 1fr) auto;
height: clamp(36rem, 52vw, 50rem);
padding: var(--gutter);
border-right: var(--hairline) solid var(--rule);
}
.hero__bar {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.hero__mark {
margin-right: auto;
color: var(--ink);
font-family: var(--font-mark);
font-size: 1.75rem;
line-height: var(--tap);
letter-spacing: -0.02em;
text-decoration: none;
}
.hero__round,
.hero__burger {
display: none;
place-items: center;
width: var(--tap);
height: var(--tap);
padding: 0;
border: 0;
background: none;
color: var(--ink);
cursor: pointer;
}
.hero__round::before,
.hero__burger span {
content: "";
grid-area: 1 / 1;
}
.hero__round {
font: 400 0.8125rem/1 var(--font-mark);
}
.hero__round-letter {
grid-area: 1 / 1;
}
.hero__round::before {
width: 1.75rem;
height: 1.75rem;
border: var(--hairline) solid var(--ink);
border-radius: var(--radius-round);
}
.hero__burger span {
width: 1.625rem;
height: 1.625rem;
border: var(--hairline) solid var(--ink);
background:
linear-gradient(var(--ink), var(--ink)) center 35% / 55% var(--hairline) no-repeat,
linear-gradient(var(--ink), var(--ink)) center 50% / 55% var(--hairline) no-repeat,
linear-gradient(var(--ink), var(--ink)) center 65% / 55% var(--hairline) no-repeat;
}
.hero__stage {
position: relative;
min-height: 0;
color: var(--ink);
}
.hero__canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.hero__index {
position: relative;
font-size: var(--text-label);
letter-spacing: var(--track-label);
text-transform: uppercase;
}
.hero__index-head,
.hero__row {
display: flex;
align-items: center;
gap: 0;
min-height: var(--tap);
margin: 0;
border-top: var(--hairline) solid var(--rule);
}
.hero__tick {
width: 2.25rem;
height: 10px;
background:
linear-gradient(var(--ink), var(--ink)) left / var(--hairline) 100% no-repeat,
linear-gradient(var(--ink), var(--ink)) left center / 10px var(--hairline) no-repeat;
}
.hero__list {
margin: 0;
padding: 0;
list-style: none;
border-bottom: var(--hairline) solid var(--rule);
}
.hero__row {
color: var(--ink-soft);
text-decoration: none;
transition: color var(--quick) var(--ease-colour);
}
.hero__row span {
width: 2.25rem;
flex: none;
}
.hero__row:hover,
.hero__row.is-active {
color: var(--ink);
}
.hero__underline {
position: absolute;
left: 0;
top: 0;
width: 4rem;
height: var(--hairline);
background: var(--rule-strong);
transform: translateY(var(--underline-y, 0));
transition: transform var(--mid) var(--ease);
}
.hero__main {
display: grid;
grid-template-rows: auto 1fr;
padding: var(--gutter) var(--gutter) var(--space-xl) calc(var(--gutter) * 1.25);
}
.hero__nav {
display: flex;
justify-self: end;
font-size: var(--text-label);
letter-spacing: var(--track-label);
text-transform: uppercase;
}
.hero__link {
display: grid;
place-items: center;
min-height: var(--tap);
padding: 0 var(--space-s);
border: var(--hairline) solid var(--rule-strong);
color: var(--ink);
text-decoration: none;
transition: background-color var(--quick) var(--ease-colour), color var(--quick) var(--ease-colour);
}
.hero__link + .hero__link {
border-left: 0;
}
.hero__link:hover {
background: var(--mist);
}
.hero__link.is-current {
background: var(--ink);
color: var(--paper);
}
.hero__copy {
align-self: start;
max-width: 44rem;
padding-top: clamp(1.5rem, 5vw, 4.5rem);
}
.hero__pills {
display: flex;
align-items: center;
margin: 0 0 var(--space-l);
font-size: var(--text-label);
letter-spacing: var(--track-label);
text-transform: uppercase;
}
.hero__pill {
padding: 0.4rem 0.75rem;
border: var(--hairline) solid var(--ink);
border-radius: var(--radius-round);
white-space: nowrap;
}
.hero__pill:first-child {
border-radius: var(--radius-box);
}
.hero__join {
width: 1.5rem;
height: var(--hairline);
background: var(--ink);
}
.hero__statement {
margin: 0;
font-family: var(--font-display);
font-size: var(--display-l);
font-weight: 300;
line-height: 0.98;
letter-spacing: var(--track-display);
text-wrap: balance;
}
@media (max-width: 48rem) {
.hero {
grid-template-columns: minmax(0, 1fr);
min-height: 0;
}
.hero__side {
position: static;
display: contents;
}
.hero__bar {
order: 0;
margin: 0 var(--gutter);
padding: var(--gutter) 0 var(--space-s);
border-bottom: var(--hairline) solid var(--rule);
}
.hero__round,
.hero__burger {
display: grid;
}
.hero__main {
order: 1;
padding: var(--space-m) var(--gutter) 0;
}
.hero__nav {
display: none;
justify-self: stretch;
flex-direction: column;
margin-bottom: var(--space-m);
}
.hero.is-open .hero__nav {
display: flex;
}
.hero__link {
justify-items: start;
}
.hero__link + .hero__link {
border-left: var(--hairline) solid var(--rule-strong);
border-top: 0;
}
.hero__copy {
padding-top: 0;
}
.hero__stage {
order: 2;
height: 18rem;
}
.hero__index {
order: 3;
margin: 0 var(--gutter) var(--space-l);
}
}
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
// A block K, drawn on a 3.4 by 4 grid with y pointing down.
const outline = [[0, 0], [1, 0], [1, 1.6], [2.2, 0], [3.4, 0], [1.9, 2], [3.4, 4], [2.2, 4], [1, 2.4], [1, 4], [0, 4]]
.map(([x, y]) => [x - 1.7, y - 2]);
const depth = 0.45;
const pitch = -0.42;
function project([x, y, z], yaw, scale, width, height) {
const turnedX = x * Math.cos(yaw) + z * Math.sin(yaw);
const turnedZ = -x * Math.sin(yaw) + z * Math.cos(yaw);
const liftedY = y * Math.cos(pitch) - turnedZ * Math.sin(pitch);
return [width / 2 + turnedX * scale, height / 2 + liftedY * scale];
}
function face(context, points) {
context.beginPath();
points.forEach(([x, y], index) => (index ? context.lineTo(x, y) : context.moveTo(x, y)));
context.closePath();
context.stroke();
}
function paint(context, width, height, seconds) {
const yaw = -0.55 + Math.sin(seconds * (Math.PI * 2 / 12)) * 0.45;
const scale = Math.min(width / 6, height / 5.6);
const front = outline.map(([x, y]) => project([x, y, depth], yaw, scale, width, height));
const back = outline.map(([x, y]) => project([x, y, -depth], yaw, scale, width, height));
context.clearRect(0, 0, width, height);
context.strokeStyle = getComputedStyle(context.canvas).color;
context.lineWidth = 1;
context.lineJoin = 'round';
context.globalAlpha = 0.3;
face(context, back);
context.globalAlpha = 0.65;
context.beginPath();
front.forEach(([x, y], index) => { context.moveTo(x, y); context.lineTo(...back[index]); });
context.stroke();
context.globalAlpha = 1;
face(context, front);
}
function runCanvas(canvas) {
const context = canvas.getContext('2d');
let frame = 0;
const fit = () => {
const density = Math.min(2, devicePixelRatio || 1);
canvas.width = canvas.clientWidth * density;
canvas.height = canvas.clientHeight * density;
context.setTransform(density, 0, 0, density, 0, 0);
paint(context, canvas.clientWidth, canvas.clientHeight, performance.now() / 1000);
};
const tick = (now) => {
paint(context, canvas.clientWidth, canvas.clientHeight, now / 1000);
frame = requestAnimationFrame(tick);
};
new ResizeObserver(fit).observe(canvas);
new IntersectionObserver(([entry]) => {
cancelAnimationFrame(frame);
if (entry.isIntersecting && !still.matches) frame = requestAnimationFrame(tick);
}).observe(canvas);
}
function runIndex(index) {
const rows = [...index.querySelectorAll('.hero__row')];
const underline = index.querySelector('.hero__underline');
const place = () => {
const active = index.querySelector('.hero__row.is-active');
underline.style.setProperty('--underline-y', `${active.offsetTop + active.offsetHeight - 1}px`);
};
rows.forEach((row) => row.addEventListener('click', (event) => {
event.preventDefault();
rows.forEach((other) => { other.classList.toggle('is-active', other === row); other.removeAttribute('aria-current'); });
row.setAttribute('aria-current', 'true');
place();
}));
new ResizeObserver(place).observe(index);
}
function runMenu(root) {
const burger = root.querySelector('.hero__burger');
burger.addEventListener('click', () => {
const open = root.classList.toggle('is-open');
burger.setAttribute('aria-expanded', String(open));
});
}
document.querySelectorAll('.hero').forEach((root) => {
root.querySelectorAll('.hero__canvas').forEach(runCanvas);
root.querySelectorAll('.hero__index').forEach(runIndex);
runMenu(root);
});
})();
</script>