Night Chart Console
A black field with a live line map of labelled points, read through small monospace type, thin white frames and a ticking readout, with one fat script wordmark for warmth. Suits night-time things with a small shop: radio, clubs, observatories, late venues.
Parts
Masthead
Navigation bar that lies over the next section: capitals links on the left, the script wordmark with a signal mark in the middle, account, bag and a white filled button on the right. Blended as a difference so it inverts over white. On phones it becomes a menu button, the wordmark and two icons, with a black full-screen menu.
Code
React For Figma<header class="masthead">
<div class="masthead__bar">
<button class="masthead__toggle" type="button" aria-expanded="false" aria-label="Open menu">
<span class="masthead__toggle-line"></span>
<span class="masthead__toggle-line"></span>
</button>
<nav class="masthead__nav" aria-label="Main">
<a class="masthead__link" href="#">Shop</a>
<a class="masthead__link" href="#">The Boat</a>
<a class="masthead__link" href="#">Night Schedule</a>
</nav>
<a class="masthead__logo" href="#" aria-label="Small Hours, home">
<svg class="masthead__signal" viewBox="0 0 48 26" aria-hidden="true" focusable="false">
<path d="M4 24a20 20 0 0 1 40 0M12 24a12 12 0 0 1 24 0M19 24a5 5 0 0 1 10 0" />
</svg>
<span class="masthead__wordmark">Small Hours</span>
</a>
<div class="masthead__actions">
<a class="masthead__link masthead__link--icon" href="#">
<span class="masthead__link-text">Account</span>
<svg class="masthead__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<circle cx="12" cy="8" r="4" />
<path d="M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7" />
</svg>
</a>
<a class="masthead__link masthead__link--icon" href="#">
<span class="masthead__link-text">Bag</span>
<svg class="masthead__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<rect x="4" y="8" width="16" height="13" rx="3" />
<path d="M8.5 8V7a3.5 3.5 0 0 1 7 0v1" />
</svg>
</a>
<a class="masthead__button" href="#">Tune in</a>
</div>
</div>
<div class="masthead__menu" inert>
<ul class="masthead__menu-list">
<li style="--i: 0"><a class="masthead__menu-link" href="#">Shop</a></li>
<li style="--i: 1"><a class="masthead__menu-link" href="#">The Boat</a></li>
<li style="--i: 2"><a class="masthead__menu-link" href="#">Night Schedule</a></li>
<li style="--i: 3"><a class="masthead__button masthead__button--menu" href="#">Tune in</a></li>
</ul>
<p class="masthead__menu-note">87.9 MHz <span class="masthead__menu-sub">On air from dusk, off at first light</span></p>
</div>
</header>
<style>
/* The root takes no room: the bar lies over whatever section comes next. */
.masthead {
height: var(--bar-height);
margin-bottom: calc(-1 * var(--bar-height));
}
/* Everything in the bar is white and blended as a difference, so it turns black by itself over a white section. */
.masthead__bar {
position: relative;
z-index: 10;
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: center;
gap: var(--space-s);
height: var(--bar-height);
padding: 0 var(--gutter);
color: var(--paper);
mix-blend-mode: difference;
}
.masthead__nav,
.masthead__actions {
display: flex;
align-items: center;
gap: var(--space-m);
}
.masthead__actions {
justify-content: flex-end;
}
.masthead__link {
position: relative;
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: inherit;
text-decoration: underline var(--frame) transparent;
text-transform: uppercase;
text-underline-offset: 0.4em;
white-space: nowrap;
transition: color var(--time-nav) var(--ease-out), text-decoration-color var(--time-fast) var(--ease-fast);
}
.masthead__link:focus-visible {
text-decoration-color: currentColor;
}
/* Hovering one link dims the others in its group. */
.masthead__nav:has(.masthead__link:hover) .masthead__link:not(:hover),
.masthead__actions:has(.masthead__link:hover) .masthead__link:not(:hover) {
color: var(--paper-dim);
}
.masthead__link::before {
content: "";
position: absolute;
top: 0;
left: 50%;
width: max(100%, var(--tap));
height: 100%;
translate: -50% 0;
}
.masthead__icon {
display: none;
width: 1.75rem;
height: 1.75rem;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
}
.masthead__button {
display: inline-flex;
align-items: center;
min-height: var(--tap);
padding: 0 var(--space-l);
margin-left: calc(var(--space-xs) * -1);
background: var(--paper);
color: var(--night);
text-decoration: none;
text-transform: uppercase;
white-space: nowrap;
transition: background-color var(--time-slow) ease, color var(--time-slow) ease;
}
.masthead__button:hover,
.masthead__button:focus-visible {
background: var(--smoke);
color: var(--paper);
}
.masthead__logo {
position: relative;
display: grid;
justify-items: center;
padding-top: 0.55em;
color: inherit;
font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.625rem);
text-decoration: none;
}
.masthead__wordmark {
font-family: var(--font-script);
font-style: italic;
font-weight: 700;
line-height: 1;
white-space: nowrap;
}
.masthead__signal {
position: absolute;
top: 0;
left: 50%;
width: 0.78em;
translate: -62% 0;
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-width: 2.6;
}
.masthead__toggle {
display: none;
position: relative;
width: var(--tap);
height: var(--tap);
margin-left: -0.5rem;
padding: 0;
border: 0;
background: none;
color: inherit;
cursor: pointer;
}
.masthead__toggle-line {
position: absolute;
left: 0.5rem;
right: 0.875rem;
top: 50%;
height: var(--frame);
background: currentColor;
translate: 0 -4px;
transition: translate var(--time) var(--ease-out), rotate var(--time) var(--ease-out);
}
.masthead__toggle-line + .masthead__toggle-line {
translate: 0 4px;
}
.masthead.is-open .masthead__toggle-line {
translate: 0 0;
rotate: 45deg;
}
.masthead.is-open .masthead__toggle-line + .masthead__toggle-line {
rotate: -45deg;
}
.masthead__menu {
position: fixed;
inset: 0;
z-index: 9;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: var(--space-xl);
padding: calc(var(--bar-height) + var(--space-s)) var(--gutter) var(--space-l);
overflow-y: auto;
overscroll-behavior: contain;
background: var(--night);
color: var(--paper);
opacity: 0;
visibility: hidden;
transition: opacity var(--time) ease, visibility 0s var(--time);
}
.masthead.is-open .masthead__menu {
opacity: 1;
visibility: visible;
transition-delay: 0s;
}
.masthead__menu-list {
display: grid;
justify-items: start;
gap: var(--space-xs);
margin: 0;
padding: 0;
list-style: none;
}
.masthead__menu-link {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: inherit;
font-size: var(--text-xl);
letter-spacing: var(--tracking-tight);
line-height: 1.1;
text-decoration: none;
text-transform: uppercase;
}
.masthead__button--menu {
margin: var(--space-m) 0 0;
}
.masthead.is-open .masthead__menu-list li {
animation: masthead-rise var(--time-slow) var(--ease-out) both;
animation-delay: calc(var(--i) * var(--stagger-step));
}
@keyframes masthead-rise {
from {
opacity: 0;
translate: 0 0.75rem;
}
}
.masthead__menu-note {
margin: 0;
font-size: var(--text-l);
letter-spacing: var(--tracking-tight);
text-transform: uppercase;
}
.masthead__menu-sub {
display: block;
color: var(--paper-dim);
font-size: var(--text-xs);
letter-spacing: var(--tracking-wide);
}
.masthead :focus-visible {
outline: var(--frame) solid currentColor;
outline-offset: 4px;
}
@media (max-width: 56rem) {
.masthead__nav,
.masthead__actions .masthead__button,
.masthead__link-text {
display: none;
}
.masthead__toggle {
display: block;
}
.masthead__actions {
gap: 0;
margin-right: -0.5rem;
}
.masthead__link--icon {
justify-content: center;
min-width: var(--tap);
}
.masthead__icon {
display: block;
}
}
@media (prefers-reduced-motion: reduce) {
.masthead__toggle-line,
.masthead__menu,
.masthead__button,
.masthead__link {
transition-duration: 0s;
}
.masthead.is-open .masthead__menu-list li {
animation: none;
}
}
</style>
<script>
(() => {
const OPEN = "is-open";
const setUpMenu = (root) => {
const toggle = root.querySelector(".masthead__toggle");
const menu = root.querySelector(".masthead__menu");
const setOpen = (open) => {
root.classList.toggle(OPEN, open);
menu.inert = !open;
toggle.setAttribute("aria-expanded", String(open));
toggle.setAttribute("aria-label", open ? "Close menu" : "Open menu");
};
toggle.addEventListener("click", () => setOpen(!root.classList.contains(OPEN)));
menu.addEventListener("click", (event) => {
if (event.target.closest("a")) setOpen(false);
});
root.addEventListener("keydown", (event) => {
if (event.key !== "Escape" || !root.classList.contains(OPEN)) return;
setOpen(false);
toggle.focus();
});
};
document.querySelectorAll(".masthead").forEach(setUpMenu);
})();
</script>
Live chart
The signature piece: a canvas map of dots and line figures with labelled points that drifts and can be dragged, a readout with a day and night switch, live clock, date and position, a floating framed notice, a floating product tile and a retro help window. Day mode swaps black and white and inverts the map.
Code
React For Figma<section class="chart" aria-label="Live relay map">
<div class="chart__sky">
<canvas
class="chart__map"
tabindex="0"
role="img"
aria-label="Map of the rooftop aerials passing the signal along the coast. Drag it, or use the left and right arrow keys, to move along the coast."
></canvas>
<div class="chart__ticker">
<div class="chart__readout">
<button class="chart__switch" type="button" role="switch" aria-checked="true" aria-label="Night view">
<span class="chart__switch-pill" aria-hidden="true">
<span class="chart__switch-label chart__switch-label--night">Night</span>
<span class="chart__switch-label chart__switch-label--day">Day</span>
<span class="chart__switch-knob">
<svg class="chart__switch-icon chart__switch-icon--night" viewBox="0 0 24 24" focusable="false">
<path d="M20.5 14.2A8.6 8.6 0 0 1 9.8 3.5a8.6 8.6 0 1 0 10.7 10.7z" />
</svg>
<svg class="chart__switch-icon chart__switch-icon--day" viewBox="0 0 24 24" focusable="false">
<circle cx="12" cy="12" r="4.5" />
<path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" />
</svg>
</span>
</span>
</button>
<span class="chart__label">Gull Reach · 87.9</span>
<time class="chart__value chart__clock">12:00:00 AM</time>
<span class="chart__sub chart__date">SAT · NOV 28, 2026</span>
<span class="chart__sub">47.6021° N · 9.4410° W</span>
</div>
<div class="chart__readout chart__readout--end">
<span class="chart__label">Next set</span>
<span class="chart__value">Nov 28</span>
</div>
</div>
<div class="chart__help">
<div class="chart__window" role="dialog" aria-label="About this map" inert>
<div class="chart__window-bar">
<span class="chart__window-title">Relay Map</span>
<button class="chart__window-close" type="button" aria-label="Close">
<svg viewBox="0 0 10 10" aria-hidden="true" focusable="false"><path d="M2 2l6 6M8 2l-6 6" /></svg>
</button>
</div>
<p class="chart__window-body">Every dot is a rooftop aerial passing our signal along the coast, live, right now. Drag the map left or right to follow it.</p>
</div>
<button class="chart__help-button" type="button" aria-expanded="false">What is this map?</button>
</div>
</div>
<aside class="chart__notice" aria-label="Tonight on air">
<button class="chart__close" type="button" aria-label="Dismiss this notice">
<svg viewBox="0 0 10 10" aria-hidden="true" focusable="false"><path d="M1.5 1.5l7 7M8.5 1.5l-7 7" /></svg>
</button>
<h2 class="chart__notice-title">Tonight on air</h2>
<p class="chart__notice-copy">Who is behind the desk on the boat this week.</p>
<a class="chart__show" href="#">
<span class="chart__show-thumb" aria-hidden="true"></span>
<span class="chart__show-name">Fog Set with Odile Marr: Sat, Nov. 28th, 11PM</span>
<span class="chart__show-state">Listen</span>
</a>
</aside>
<aside class="chart__tile" aria-label="From the shop">
<button class="chart__close chart__close--chip" type="button" aria-label="Dismiss this product">
<svg viewBox="0 0 10 10" aria-hidden="true" focusable="false"><path d="M1.5 1.5l7 7M8.5 1.5l-7 7" /></svg>
</button>
<a class="chart__tile-link" href="#">
<span class="chart__tile-picture">
<svg class="chart__tile-art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<path class="chart__tile-cloth" d="M50 124C50 64 76 40 100 40s50 24 50 84z" />
<rect class="chart__tile-cloth" x="43" y="116" width="114" height="44" rx="7" />
<path class="chart__tile-rib" d="M52 122h96" />
<text class="chart__tile-print" x="100" y="145" text-anchor="middle">Small Hours</text>
</svg>
</span>
<span class="chart__tile-name">Small Hours Dock Beanie</span>
</a>
</aside>
</section>
<style>
/* Night is the default. Day swaps the two inks; the map itself is drawn once in night colours and inverted. */
.chart {
--chart-ground: var(--night);
--chart-ink: var(--paper);
--chart-ink-dim: var(--paper-dim);
--chart-ink-faint: var(--paper-faint);
position: relative;
background-color: var(--chart-ground);
color: var(--chart-ink);
transition: background-color var(--time-slow) ease, color var(--time-slow) ease;
}
.chart.is-day {
--chart-ground: var(--paper);
--chart-ink: var(--night);
--chart-ink-dim: var(--night-dim);
--chart-ink-faint: var(--night-faint);
}
.chart__sky {
position: relative;
height: clamp(40rem, 56.25vw, 50.625rem);
overflow: hidden;
border-bottom: var(--frame) solid var(--chart-ink);
transition: border-color var(--time-slow) ease;
}
.chart__map {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
cursor: grab;
touch-action: pan-y;
-webkit-mask-image: linear-gradient(to bottom, var(--night) 74%, transparent 96%);
mask-image: linear-gradient(to bottom, var(--night) 74%, transparent 96%);
transition: filter var(--time-slow) ease;
}
.chart__map.is-held {
cursor: grabbing;
}
.chart.is-day .chart__map {
filter: invert(1) grayscale(1);
}
/* Readout along the bottom edge. It lets drags through to the map; only the switch takes clicks. */
.chart__ticker {
position: absolute;
inset: auto 0 0;
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: var(--space-s);
padding: 0 clamp(1rem, 2.2vw, 2rem) var(--space-m);
pointer-events: none;
}
.chart__readout {
display: grid;
min-width: 0;
justify-items: start;
text-transform: uppercase;
white-space: nowrap;
}
.chart__readout--end {
justify-items: end;
}
.chart__label {
color: var(--chart-ink-dim);
font-size: var(--text-s);
letter-spacing: var(--tracking-wide);
line-height: 1.3;
}
.chart__value {
font-size: var(--text-l);
letter-spacing: var(--tracking-tight);
line-height: 1.15;
}
.chart__sub {
color: var(--chart-ink-faint);
font-size: var(--text-xs);
letter-spacing: var(--tracking-wide);
line-height: 1.4;
}
.chart__switch {
display: flex;
align-items: center;
min-height: var(--tap);
margin-bottom: 0.25rem;
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
cursor: pointer;
pointer-events: auto;
}
.chart__switch-pill {
position: relative;
display: block;
width: 6.5rem;
height: 1.75rem;
border: var(--frame) solid currentColor;
border-radius: var(--radius-pill);
background-color: var(--chart-ground);
transition: background-color var(--time-slow) ease;
}
.chart__switch-label {
position: absolute;
top: 50%;
left: 0.8125rem;
font-size: var(--text-xs);
letter-spacing: var(--tracking-wide);
line-height: 1;
text-transform: uppercase;
translate: 0 -50%;
transition: opacity var(--time) ease;
}
.chart__switch-label--day {
left: auto;
right: 0.625rem;
opacity: 0;
}
.chart__switch-knob {
position: absolute;
top: 0.1875rem;
left: 0.1875rem;
display: grid;
place-items: center;
width: 1.25rem;
height: 1.25rem;
border-radius: 50%;
background-color: var(--chart-ink);
color: var(--chart-ground);
translate: 4.625rem 0;
transition: translate var(--time) var(--ease-out), background-color var(--time-slow) ease, color var(--time-slow) ease;
}
.chart__switch-icon {
grid-area: 1 / 1;
width: 0.8125rem;
height: 0.8125rem;
fill: currentColor;
stroke: currentColor;
stroke-linecap: round;
stroke-width: 2.2;
transition: opacity var(--time) ease;
}
.chart__switch-icon--night {
stroke: none;
}
.chart__switch-icon--day {
opacity: 0;
}
.chart.is-day .chart__switch-knob {
translate: 0 0;
}
.chart.is-day .chart__switch-label--night,
.chart.is-day .chart__switch-icon--night {
opacity: 0;
}
.chart.is-day .chart__switch-label--day,
.chart.is-day .chart__switch-icon--day {
opacity: 1;
}
/* Retro help: a bevelled button and the small window it opens. */
.chart__help {
position: absolute;
right: clamp(1rem, 1.7vw, 1.5rem);
bottom: 7.5rem;
z-index: 2;
display: grid;
justify-items: end;
gap: 0.75rem;
pointer-events: none;
}
.chart__help-button,
.chart__window,
.chart__window-close {
border: 2px solid;
border-color: var(--paper) var(--retro-edge) var(--retro-edge) var(--paper);
color: var(--night);
}
.chart__help-button {
position: relative;
padding: 0.25rem 0.625rem;
border-radius: var(--radius-chip);
background: var(--retro-chip);
font: 700 var(--text-xs) / 1.2 var(--font-mono);
text-transform: uppercase;
white-space: nowrap;
cursor: pointer;
pointer-events: auto;
}
.chart__help-button::before,
.chart__window-close::before,
.chart__close::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: max(100%, var(--tap));
height: max(100%, var(--tap));
translate: -50% -50%;
}
.chart__help-button:active,
.chart__window-close:active {
border-color: var(--retro-edge) var(--paper) var(--paper) var(--retro-edge);
}
.chart__window {
width: min(16.25rem, 100vw - 2 * var(--gutter));
background: var(--retro-face);
opacity: 0;
visibility: hidden;
translate: 0 0.375rem;
transition: opacity var(--time) ease, translate var(--time) var(--ease-out), visibility 0s var(--time);
pointer-events: auto;
}
.chart__help.is-open .chart__window {
opacity: 1;
visibility: visible;
translate: 0 0;
transition-delay: 0s;
}
.chart__window-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.125rem 0.125rem 0.125rem 0.375rem;
background: linear-gradient(90deg, var(--retro-bar), var(--retro-bar-end));
color: var(--paper);
font-size: var(--text-xs);
font-weight: 700;
}
.chart__window-close {
position: relative;
display: grid;
place-items: center;
width: 1rem;
height: 0.875rem;
padding: 0;
border-width: 1px;
background: var(--retro-face);
cursor: pointer;
}
.chart__window-close svg,
.chart__close svg {
width: 0.625rem;
height: 0.625rem;
fill: none;
stroke: currentColor;
stroke-width: 1.2;
}
.chart__window-close svg {
width: 0.5rem;
height: 0.5rem;
stroke-width: 2;
}
.chart__window-body {
margin: 0;
padding: 0.75rem;
font-size: var(--text-xs);
line-height: 1.5;
}
/* Floating frames over the map. */
.chart__notice,
.chart__tile {
position: absolute;
transition: opacity var(--time) ease, visibility 0s var(--time);
}
.chart__notice.is-dismissed,
.chart__tile.is-dismissed {
opacity: 0;
visibility: hidden;
}
.chart__close {
position: absolute;
top: 0.5rem;
right: 0.5rem;
z-index: 1;
display: grid;
place-items: center;
width: 1.375rem;
height: 1.375rem;
padding: 0;
border: 0;
border-radius: var(--radius-chip);
background: none;
color: inherit;
cursor: pointer;
}
.chart__close--chip {
background: color-mix(in srgb, var(--night) 30%, transparent);
color: var(--paper);
}
.chart__notice {
left: var(--gutter);
top: clamp(13rem, 21vw, 19rem);
width: min(25.5rem, 100% - 2 * var(--gutter));
padding: var(--space-l);
border: var(--frame) solid var(--chart-ink);
background-color: var(--chart-ground);
transition: opacity var(--time) ease, visibility 0s var(--time), background-color var(--time-slow) ease, border-color var(--time-slow) ease;
}
.chart__notice-title {
margin: 0 0 var(--space-xs);
font-size: var(--text-l);
font-weight: 400;
letter-spacing: var(--tracking-tight);
line-height: 1.15;
text-transform: uppercase;
}
.chart__notice-copy {
max-width: 17rem;
margin: 0 0 var(--space-s);
}
.chart__show {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: var(--space-m);
padding: 0.9375rem;
border: var(--frame) solid var(--chart-ink);
color: inherit;
text-decoration: none;
transition: border-color var(--time-slow) ease;
}
.chart__show-thumb {
width: 3rem;
height: 3rem;
border: var(--frame) solid var(--chart-ink-dim);
background:
radial-gradient(circle at 68% 30%, var(--scene-amber) 0 9%, transparent 10%),
linear-gradient(to top, var(--night) 28%, transparent 28%),
linear-gradient(160deg, var(--scene-sea), var(--scene-sky) 60%, var(--scene-glow));
}
.chart__show-state {
text-decoration: underline var(--frame) currentColor;
text-transform: uppercase;
text-underline-offset: 0.4em;
transition: text-decoration-color var(--time-fast) var(--ease-fast);
}
.chart__show:hover .chart__show-state,
.chart__show:focus-visible .chart__show-state {
text-decoration-color: transparent;
}
.chart__tile {
right: var(--gutter);
top: clamp(8.75rem, 16vw, 16.5rem);
width: 9.0625rem;
}
.chart__tile-link {
display: block;
color: inherit;
text-decoration: none;
transition: translate var(--time) ease-out;
}
.chart__tile-link:hover,
.chart__tile-link:focus-visible {
translate: 0 calc(-1 * var(--lift));
}
.chart__tile-picture {
display: block;
aspect-ratio: 1;
border: var(--frame) solid var(--chart-ink);
border-bottom: 0;
background: var(--paper);
transition: border-color var(--time-slow) ease;
}
.chart__tile-art {
display: block;
width: 100%;
height: 100%;
}
.chart__tile-cloth {
fill: var(--night);
}
.chart__tile-rib {
fill: none;
stroke: var(--smoke);
stroke-width: 1.5;
}
.chart__tile-print {
fill: var(--wordmark-shade);
font: italic 700 17px var(--font-script);
paint-order: stroke;
stroke: var(--night);
stroke-width: 5px;
}
.chart__tile-name {
display: block;
padding: 0.8125rem var(--space-s);
border: var(--frame) solid var(--chart-ink);
background-color: var(--chart-ground);
text-align: center;
transition: background-color var(--time-slow) ease, border-color var(--time-slow) ease;
}
.chart :focus-visible {
outline: var(--frame) solid var(--chart-ink);
outline-offset: 3px;
}
.chart__map:focus-visible {
outline-offset: -4px;
}
@media (max-width: 48rem) {
.chart__help {
right: var(--gutter);
bottom: 6.75rem;
}
.chart__notice {
position: relative;
top: auto;
left: auto;
width: auto;
margin: var(--space-l) var(--gutter);
padding: var(--space-m);
}
.chart__notice.is-dismissed,
.chart__tile {
display: none;
}
.chart__show {
gap: 0.75rem;
padding: 0.75rem;
}
}
@media (prefers-reduced-motion: reduce) {
.chart,
.chart *,
.chart *::before {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
const WORLD_WIDTH = 2600;
const WORLD_HEIGHT = 1000;
const COLUMNS = 9;
const ROWS = 4;
const EMPTY_SHARE = 0.28;
const DUST_COUNT = 300;
const SEED = 879;
const START_CENTRE = 1300;
const DRIFT_PER_SECOND = 5;
const LONGEST_FRAME = 100;
const KEY_STEP = 60;
const TURN = Math.PI * 2;
const LABEL_SIZE = 15;
const DAY = "is-day";
const OPEN = "is-open";
const HELD = "is-held";
const DISMISSED = "is-dismissed";
const DAYS = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const MONTHS = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
/* Named aerials: each one starts a figure of lines. */
const MASTS = [
{ label: "Cold Harbour", x: 1180, y: 250, ink: "star", radius: 2.2 },
{ label: "Gull Reach", x: 560, y: 740, ink: "star", radius: 2.2 },
{ label: "Saltmarsh", x: 800, y: 770, ink: "star", radius: 2.2 },
{ label: "Old Quarry", x: 1480, y: 830, ink: "star", radius: 2.2 },
{ label: "Kestrel Hill", x: 2080, y: 690, ink: "star", radius: 2.2 },
{ label: "Pier Nine", x: 2440, y: 300, ink: "star", radius: 2.2 },
];
/* Named points that stand alone, off the lines. */
const BEACONS = [
{ label: "The Boat", x: 1300, y: 540, ink: "live", radius: 2.4 },
{ label: "Lightship", x: 1580, y: 705, ink: "ghost", radius: 5 },
];
const seededRandom = (seed) => {
let state = seed;
return () => {
state = (state + 0x6d2b79f5) | 0;
let mixed = Math.imul(state ^ (state >>> 15), 1 | state);
mixed = (mixed + Math.imul(mixed ^ (mixed >>> 7), 61 | mixed)) ^ mixed;
return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296;
};
};
const between = (random, low, high) => low + random() * (high - low);
const wholeBetween = (random, low, high) => Math.floor(between(random, low, high + 1));
const walkFrom = (random, start, steps) => {
const points = [start];
let heading = between(random, 0, TURN);
for (let step = 0; step < steps; step += 1) {
heading += between(random, -1.1, 1.1);
const reach = between(random, 45, 135);
const last = points[points.length - 1];
points.push({ x: last.x + Math.cos(heading) * reach, y: last.y + Math.sin(heading) * reach });
}
return points;
};
const ringAround = (random, centre) => {
const corners = wholeBetween(random, 3, 5);
const turn = between(random, 0, TURN);
const ring = Array.from({ length: corners }, (_, corner) => {
const angle = turn + (corner / corners) * TURN + between(random, -0.3, 0.3);
const reach = between(random, 28, 72);
return { x: centre.x + Math.cos(angle) * reach, y: centre.y + Math.sin(angle) * reach };
});
return [...ring, ring[0]];
};
/* A figure is a list of connected lines: a ring with a tail, or a spine with an optional branch. */
const figureFrom = (random, start) => {
if (random() < 0.2) {
const ring = ringAround(random, start);
return [ring, walkFrom(random, ring[1], wholeBetween(random, 1, 3))];
}
const spine = walkFrom(random, start, wholeBetween(random, 2, 6));
const branches = random() < 0.35 && spine.length > 3;
return branches ? [spine, walkFrom(random, spine[Math.floor(spine.length / 2)], wholeBetween(random, 1, 2))] : [spine];
};
const scatteredStarts = (random) => {
const starts = [];
for (let column = 0; column < COLUMNS; column += 1) {
for (let row = 0; row < ROWS; row += 1) {
if (random() < EMPTY_SHARE) continue;
starts.push({
x: ((column + between(random, 0.15, 0.85)) * WORLD_WIDTH) / COLUMNS,
y: ((row + between(random, 0.15, 0.85)) * WORLD_HEIGHT) / ROWS,
});
}
}
return starts;
};
const buildWorld = () => {
const random = seededRandom(SEED);
const starts = [...MASTS, ...scatteredStarts(random)];
return {
figures: starts.map((start) => figureFrom(random, start)),
dust: Array.from({ length: DUST_COUNT }, () => ({
x: random() * WORLD_WIDTH,
y: random() * WORLD_HEIGHT,
radius: between(random, 0.4, 1.25),
glow: between(random, 0.25, 1),
})),
places: [...MASTS, ...BEACONS],
};
};
const WORLD = buildWorld();
const readInks = (root) => {
const style = getComputedStyle(root);
const token = (name) => style.getPropertyValue(name).trim();
return {
star: token("--paper"),
line: token("--map-line"),
live: token("--map-live"),
ghost: token("--map-ghost"),
ground: token("--night"),
labelFont: `500 ${LABEL_SIZE}px ${token("--font-label")}`,
};
};
const dot = (context, at, radius) => {
context.beginPath();
context.arc(at.x, at.y, radius, 0, TURN);
context.fill();
};
const paintDust = (context, place, inks) => {
context.fillStyle = inks.star;
WORLD.dust.forEach((speck) => {
context.globalAlpha = speck.glow;
dot(context, place(speck), speck.radius);
});
context.globalAlpha = 1;
};
const paintFigures = (context, place, inks) => {
context.strokeStyle = inks.line;
context.lineWidth = 1;
context.beginPath();
WORLD.figures.flat().forEach((line) => {
line.forEach((point, index) => {
const at = place(point);
if (index === 0) context.moveTo(at.x, at.y);
else context.lineTo(at.x, at.y);
});
});
context.stroke();
context.fillStyle = inks.star;
WORLD.figures.flat(2).forEach((point) => dot(context, place(point), 1.3));
};
const paintPlaces = (context, place, inks) => {
context.font = inks.labelFont;
context.shadowColor = inks.ground;
context.shadowBlur = 5;
WORLD.places.forEach((spot) => {
const at = place(spot);
context.fillStyle = inks[spot.ink];
dot(context, at, spot.radius);
context.fillText(spot.label, at.x + spot.radius + 4, at.y - 5);
});
context.shadowBlur = 0;
};
/* The world repeats sideways: these are the left edges, in world units, of every copy that shows. */
const copyEdges = (view) => {
const left = view.centre - view.width / view.scale / 2;
const first = -(((left % WORLD_WIDTH) + WORLD_WIDTH) % WORLD_WIDTH);
const edges = [];
for (let edge = first; edge * view.scale < view.width; edge += WORLD_WIDTH) edges.push(edge);
return edges;
};
const paint = (context, view, inks) => {
context.clearRect(0, 0, view.width, view.height);
copyEdges(view).forEach((edge) => {
const place = (point) => ({ x: (point.x + edge) * view.scale, y: point.y * view.scale });
paintDust(context, place, inks);
paintFigures(context, place, inks);
paintPlaces(context, place, inks);
});
};
const fitCanvas = (canvas, context, view) => {
const box = canvas.getBoundingClientRect();
const density = window.devicePixelRatio || 1;
canvas.width = Math.round(box.width * density);
canvas.height = Math.round(box.height * density);
context.setTransform(density, 0, 0, density, 0, 0);
view.width = box.width;
view.height = box.height;
view.scale = box.height / WORLD_HEIGHT;
};
const setUpDrag = (canvas, view, repaint) => {
let lastX = null;
const release = () => {
lastX = null;
view.held = false;
canvas.classList.remove(HELD);
};
canvas.addEventListener("pointerdown", (event) => {
lastX = event.clientX;
view.held = true;
canvas.classList.add(HELD);
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", (event) => {
if (lastX === null) return;
view.centre -= (event.clientX - lastX) / view.scale;
lastX = event.clientX;
repaint();
});
canvas.addEventListener("pointerup", release);
canvas.addEventListener("pointercancel", release);
canvas.addEventListener("keydown", (event) => {
const step = { ArrowLeft: -KEY_STEP, ArrowRight: KEY_STEP }[event.key];
if (!step) return;
event.preventDefault();
view.centre += step;
repaint();
});
};
/* The map creeps sideways while it is on screen and nobody holds it. */
const setUpDrift = (canvas, view, repaint) => {
let lastTime = null;
let onScreen = false;
const frame = (time) => {
if (!onScreen) {
lastTime = null;
return;
}
if (lastTime !== null && !view.held) view.centre += (DRIFT_PER_SECOND * Math.min(time - lastTime, LONGEST_FRAME)) / 1000;
lastTime = time;
repaint();
requestAnimationFrame(frame);
};
new IntersectionObserver(([entry]) => {
const wasOnScreen = onScreen;
onScreen = entry.isIntersecting;
if (onScreen && !wasOnScreen) requestAnimationFrame(frame);
}).observe(canvas);
};
const setUpMap = (root) => {
const canvas = root.querySelector(".chart__map");
const context = canvas.getContext("2d");
const inks = readInks(root);
const view = { width: 0, height: 0, scale: 1, centre: START_CENTRE, held: false };
const repaint = () => paint(context, view, inks);
new ResizeObserver(() => {
fitCanvas(canvas, context, view);
repaint();
}).observe(canvas);
document.fonts.load(inks.labelFont).then(repaint);
setUpDrag(canvas, view, repaint);
if (!matchMedia("(prefers-reduced-motion: reduce)").matches) setUpDrift(canvas, view, repaint);
};
const twoDigits = (number) => String(number).padStart(2, "0");
const clockText = (now) => {
const hours = now.getHours();
return `${twoDigits(hours % 12 || 12)}:${twoDigits(now.getMinutes())}:${twoDigits(now.getSeconds())} ${hours < 12 ? "AM" : "PM"}`;
};
const dateText = (now) => `${DAYS[now.getDay()]} · ${MONTHS[now.getMonth()]} ${now.getDate()}, ${now.getFullYear()}`;
const setUpClock = (root) => {
const clock = root.querySelector(".chart__clock");
const date = root.querySelector(".chart__date");
const tick = () => {
const now = new Date();
clock.textContent = clockText(now);
date.textContent = dateText(now);
};
tick();
setInterval(tick, 1000);
};
const setUpSwitch = (root) => {
const control = root.querySelector(".chart__switch");
control.addEventListener("click", () => {
const day = root.classList.toggle(DAY);
control.setAttribute("aria-checked", String(!day));
});
};
const setUpHelp = (root) => {
const help = root.querySelector(".chart__help");
const button = help.querySelector(".chart__help-button");
const helpWindow = help.querySelector(".chart__window");
const setOpen = (open) => {
help.classList.toggle(OPEN, open);
helpWindow.inert = !open;
button.setAttribute("aria-expanded", String(open));
};
button.addEventListener("click", () => setOpen(!help.classList.contains(OPEN)));
help.querySelector(".chart__window-close").addEventListener("click", () => {
setOpen(false);
button.focus();
});
help.addEventListener("keydown", (event) => {
if (event.key !== "Escape") return;
setOpen(false);
button.focus();
});
};
const setUpDismissing = (root) => {
root.querySelectorAll(".chart__close").forEach((close) => {
close.addEventListener("click", () => close.parentElement.classList.add(DISMISSED));
});
};
document.querySelectorAll(".chart").forEach((root) => {
setUpMap(root);
setUpClock(root);
setUpSwitch(root);
setUpHelp(root);
setUpDismissing(root);
});
})();
</script>
Statement
A large capitals statement on a field of faint dots with a small framed aside that can be dismissed, and a row of framed figures under it.
Code
React For Figma<section class="statement">
<svg class="statement__field" viewBox="0 0 1440 720" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<path class="statement__dust" d="M159 551h.1M742 158h.1M23 192h.1M293 334h.1M230 283h.1M719 602h.1M1422 675h.1M49 184h.1M849 706h.1M929 63h.1M888 597h.1M896 220h.1M38 681h.1M942 485h.1M1252 216h.1M922 516h.1M86 674h.1M1344 279h.1M1191 49h.1M531 334h.1M442 347h.1M265 430h.1M1424 511h.1M1218 398h.1M1061 16h.1M1201 449h.1M1251 455h.1M1361 243h.1M1397 391h.1M175 70h.1M476 36h.1M957 383h.1M128 535h.1M842 506h.1M556 386h.1M516 320h.1M758 178h.1M472 418h.1M260 563h.1M26 242h.1M415 467h.1M1172 183h.1M944 634h.1M1119 185h.1M565 455h.1M1357 566h.1M1060 455h.1M645 160h.1M136 461h.1M1171 443h.1M1172 230h.1M1144 499h.1M265 699h.1M1240 123h.1M156 691h.1M663 232h.1M1102 630h.1M785 140h.1M1311 393h.1M1051 388h.1M651 692h.1M1082 618h.1M822 609h.1M1385 134h.1M1184 611h.1M729 514h.1M1262 35h.1M876 538h.1M992 55h.1M1069 518h.1M374 545h.1M719 670h.1M510 114h.1M538 341h.1M33 689h.1M381 131h.1M506 120h.1M990 346h.1M853 301h.1M559 16h.1M354 103h.1M1313 663h.1M1393 659h.1M1434 16h.1M233 502h.1M935 517h.1M754 504h.1M750 274h.1M1133 542h.1M292 242h.1M644 594h.1M678 681h.1M166 302h.1M491 31h.1M1254 272h.1M1073 222h.1M784 82h.1M194 490h.1M1003 508h.1M801 50h.1M1355 473h.1M1029 161h.1M801 66h.1M159 237h.1M19 174h.1M1066 614h.1M491 36h.1M982 193h.1M340 144h.1M1163 243h.1" />
<path class="statement__dust statement__dust--bright" d="M335 461h.1M596 561h.1M6 485h.1M1232 656h.1M458 534h.1M744 264h.1M1060 694h.1M922 331h.1M39 409h.1M1159 85h.1M946 240h.1M1169 5h.1M648 569h.1M215 557h.1M655 239h.1M137 636h.1M1131 438h.1M462 373h.1M305 155h.1M106 9h.1M260 155h.1M1311 93h.1M190 586h.1M502 133h.1M1258 414h.1M664 522h.1M468 390h.1M615 573h.1M391 424h.1M1221 636h.1M130 532h.1M154 265h.1M163 492h.1M380 206h.1M766 631h.1M1062 246h.1M1404 609h.1M433 265h.1M796 231h.1M1045 274h.1M982 63h.1M109 469h.1M71 397h.1M63 219h.1" />
</svg>
<div class="statement__body">
<p class="statement__lead">Small Hours is a radio station on a retired pilot boat, moored off Gull Reach and on air from dusk until the first ferry.</p>
<aside class="statement__aside">
<button class="statement__close" type="button" aria-label="Dismiss this note">
<svg viewBox="0 0 10 10" aria-hidden="true" focusable="false"><path d="M1.5 1.5l7 7M8.5 1.5l-7 7" /></svg>
</button>
<p class="statement__note">Twelve volunteers, one mast and a kettle. Every night somebody takes the desk and plays what the daytime has no room for: slow records, field tapes, shipping news, long silences. Listeners with an aerial on the roof pass the signal along the coast.</p>
</aside>
</div>
<dl class="statement__figures">
<div class="statement__figure">
<dt class="statement__term">Frequency</dt>
<dd class="statement__value">87.9 MHz</dd>
</div>
<div class="statement__figure">
<dt class="statement__term">On air</dt>
<dd class="statement__value">Dusk to 05:40</dd>
</div>
<div class="statement__figure">
<dt class="statement__term">Rooftop relays</dt>
<dd class="statement__value">214</dd>
</div>
<div class="statement__figure">
<dt class="statement__term">Nights in a row</dt>
<dd class="statement__value">1,306</dd>
</div>
</dl>
</section>
<style>
.statement {
position: relative;
padding: var(--section-space) var(--gutter);
background: var(--night);
color: var(--paper);
}
/* A field of dots behind the text. Each dot is a zero-length stroke with round ends, so it keeps its size at any width. */
.statement__field {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.statement__dust {
fill: none;
stroke: var(--paper-dim);
stroke-linecap: round;
stroke-width: 1.3;
vector-effect: non-scaling-stroke;
}
.statement__dust--bright {
stroke: var(--paper);
stroke-width: 1.9;
}
.statement__body {
position: relative;
display: grid;
grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
align-items: start;
justify-content: space-between;
gap: var(--space-xl) calc(100% / 12);
}
.statement__lead {
margin: 0;
font-size: var(--text-xl);
letter-spacing: var(--tracking-tight);
line-height: 1;
text-transform: uppercase;
text-wrap: balance;
}
.statement__aside {
position: relative;
padding: var(--space-m) var(--space-xl) var(--space-m) var(--space-m);
border: var(--frame) solid var(--paper);
background: var(--night);
transition: opacity var(--time) ease, visibility 0s var(--time);
}
.statement__aside.is-dismissed {
opacity: 0;
visibility: hidden;
}
.statement__note {
margin: 0;
text-transform: uppercase;
}
.statement__close {
position: absolute;
top: 0.5rem;
right: 0.5rem;
display: grid;
place-items: center;
width: 1.375rem;
height: 1.375rem;
padding: 0;
border: 0;
background: none;
color: inherit;
cursor: pointer;
}
.statement__close::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: var(--tap);
height: var(--tap);
translate: -50% -50%;
}
.statement__close svg {
width: 0.625rem;
height: 0.625rem;
fill: none;
stroke: currentColor;
stroke-width: 1.2;
}
.statement__close:focus-visible {
outline: var(--frame) solid currentColor;
outline-offset: 3px;
}
/* Framed boxes that share their edges. */
.statement__figures {
position: relative;
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
margin: var(--section-space) 0 0;
border: var(--frame) solid var(--paper);
background: var(--night);
}
.statement__figure {
display: grid;
gap: var(--space-xs);
padding: var(--space-m);
text-transform: uppercase;
}
.statement__figure + .statement__figure {
border-left: var(--frame) solid var(--paper);
}
.statement__term {
color: var(--paper-dim);
font-size: var(--text-xs);
letter-spacing: var(--tracking-wide);
}
.statement__value {
margin: 0;
font-size: var(--text-l);
letter-spacing: var(--tracking-tight);
line-height: 1.15;
}
@media (max-width: 48rem) {
.statement__body {
grid-template-columns: minmax(0, 1fr);
}
.statement__aside.is-dismissed {
display: none;
}
.statement__figures {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.statement__figure:nth-child(odd) {
border-left: 0;
}
.statement__figure:nth-child(n + 3) {
border-top: var(--frame) solid var(--paper);
}
}
@media (prefers-reduced-motion: reduce) {
.statement__aside {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
const DISMISSED = "is-dismissed";
document.querySelectorAll(".statement").forEach((root) => {
const aside = root.querySelector(".statement__aside");
root.querySelector(".statement__close").addEventListener("click", () => aside.classList.add(DISMISSED));
});
})();
</script>
Shop shelf
A label row and four small product tiles: a white picture square with a drawn item and a framed caption box with name and price. Tiles rise on hover and show a round add button that confirms with a tick.
Code
React For Figma<section class="shelf">
<header class="shelf__head">
<h2 class="shelf__label">Ship's stores</h2>
<a class="shelf__all" href="#">All 14 items</a>
</header>
<ul class="shelf__grid">
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<path class="shelf__strap" d="M74 84V60a26 26 0 0 1 52 0v24" />
<path class="shelf__cloth" d="M46 78h108l8 98H38z" />
<text class="shelf__print" x="100" y="136" text-anchor="middle">Small Hours</text>
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Night Shift Tote</span>
<span class="shelf__price">$28</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Night Shift Tote in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<path class="shelf__cloth" d="M62 126C62 80 88 58 114 58c30 0 50 24 50 60v8z" />
<path class="shelf__cloth" d="M64 120c-24 2-42 10-48 24 36-10 72-12 106-12l42-8z" />
<circle class="shelf__cloth" cx="114" cy="57" r="4.5" />
<path class="shelf__arc" d="M90 108a17 17 0 0 1 34 0M98 108a9 9 0 0 1 18 0" />
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Dead Air Cap</span>
<span class="shelf__price">$34</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Dead Air Cap in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<rect class="shelf__cloth" x="28" y="54" width="144" height="94" rx="8" />
<rect class="shelf__pale" x="42" y="66" width="116" height="52" rx="3" />
<rect class="shelf__cloth" x="60" y="88" width="80" height="22" rx="11" />
<circle class="shelf__hole" cx="74" cy="99" r="6.5" />
<circle class="shelf__hole" cx="126" cy="99" r="6.5" />
<path class="shelf__seam" d="M58 148l8-20h68l8 20" />
<text class="shelf__ink" x="100" y="82" text-anchor="middle">Fog Set</text>
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Tape 014: Fog Set</span>
<span class="shelf__price">$12</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Tape 014: Fog Set in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<path class="shelf__strap" d="M136 84c30 0 30 46 0 46" />
<rect class="shelf__cloth" x="54" y="60" width="88" height="94" rx="9" />
<text class="shelf__print shelf__print--small" x="98" y="113" text-anchor="middle">Small Hours</text>
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Kettle Watch Mug</span>
<span class="shelf__price">$18</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Kettle Watch Mug in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<path class="shelf__cloth" d="M74 42c8 11 44 11 52 0l46 24-15 32-15-8v84H58V90l-15 8-15-32z" />
<text class="shelf__print shelf__print--small" x="100" y="112" text-anchor="middle">Small Hours</text>
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Crew Tee, Black</span>
<span class="shelf__price">$32</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Crew Tee, Black in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
<li class="shelf__item">
<a class="shelf__tile" href="#">
<span class="shelf__picture">
<svg class="shelf__art" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
<circle class="shelf__cloth" cx="100" cy="100" r="64" />
<circle class="shelf__stitch" cx="100" cy="100" r="56" />
<path class="shelf__arc" d="M70 112a30 30 0 0 1 60 0M81 112a19 19 0 0 1 38 0M91 112a9 9 0 0 1 18 0" />
<text class="shelf__print shelf__print--small" x="100" y="138" text-anchor="middle">87.9</text>
</svg>
</span>
<span class="shelf__caption">
<span class="shelf__name">Relay Patch</span>
<span class="shelf__price">$6</span>
</span>
</a>
<button class="shelf__add" type="button" aria-pressed="false" aria-label="Relay Patch in bag">
<svg class="shelf__add-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path class="shelf__add-plus" d="M12 6v12M6 12h12" />
<path class="shelf__add-tick" d="M6 12.5l4 4 8-9" />
</svg>
</button>
</li>
</ul>
</section>
<style>
.shelf {
padding: var(--section-space) var(--gutter);
background: var(--night);
color: var(--paper);
}
.shelf__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-s);
margin-bottom: var(--space-s);
}
.shelf__label {
margin: 0;
font-size: inherit;
font-weight: 400;
text-transform: uppercase;
}
.shelf__all {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: inherit;
text-decoration: underline var(--frame) currentColor;
text-transform: uppercase;
text-underline-offset: 0.4em;
transition: text-decoration-color var(--time-fast) var(--ease-fast);
}
.shelf__all:hover,
.shelf__all:focus-visible {
text-decoration-color: transparent;
}
.shelf__grid {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: var(--gap);
margin: 0;
padding: 0;
list-style: none;
}
.shelf__item {
position: relative;
display: grid;
transition: translate var(--time) ease-out;
}
.shelf__item:hover,
.shelf__item:focus-within {
translate: 0 calc(-1 * var(--lift));
}
.shelf__tile {
display: grid;
grid-template-rows: auto 1fr;
color: inherit;
text-decoration: none;
}
.shelf__picture {
display: block;
aspect-ratio: 1;
background: var(--paper);
}
.shelf__art {
display: block;
width: 100%;
height: 100%;
}
.shelf__cloth {
fill: var(--night);
}
.shelf__pale {
fill: var(--wordmark-shade);
}
.shelf__hole {
fill: var(--paper);
}
.shelf__strap,
.shelf__seam,
.shelf__arc,
.shelf__stitch {
fill: none;
stroke: var(--night);
stroke-linecap: round;
stroke-width: 9;
}
.shelf__seam {
stroke: var(--smoke);
stroke-width: 2;
}
.shelf__arc {
stroke: var(--wordmark-shade);
stroke-width: 3.5;
}
.shelf__stitch {
stroke: var(--wordmark-shade);
stroke-dasharray: 5 4;
stroke-linecap: butt;
stroke-width: 1.5;
}
.shelf__print,
.shelf__ink {
fill: var(--wordmark-shade);
font: italic 700 19px var(--font-script);
}
.shelf__print--small {
font-size: 15px;
}
.shelf__ink {
fill: var(--night);
font-size: 13px;
}
.shelf__caption {
display: grid;
align-content: center;
gap: 0.125rem;
padding: 0.8125rem var(--space-xs);
border: var(--frame) solid var(--paper);
text-align: center;
}
.shelf__price {
color: var(--paper-dim);
}
/* The add button waits for a hover where there is one, and stays on screen where there is none. */
.shelf__add {
position: absolute;
top: 0.375rem;
right: 0.375rem;
display: grid;
place-items: center;
width: 2.25rem;
height: 2.25rem;
padding: 0;
border: var(--frame) solid var(--night);
border-radius: var(--radius-pill);
background: var(--paper);
color: var(--night);
cursor: pointer;
transition: opacity var(--time) ease, background-color var(--time-slow) ease, color var(--time-slow) ease;
}
.shelf__add:hover,
.shelf__add.is-added {
background: var(--night);
color: var(--paper);
}
.shelf__add::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: var(--tap);
height: var(--tap);
translate: -50% -50%;
}
.shelf__add-icon {
width: 1.25rem;
height: 1.25rem;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
}
.shelf__add-tick,
.shelf__add.is-added .shelf__add-plus {
display: none;
}
.shelf__add.is-added .shelf__add-tick {
display: inline;
}
@media (hover: hover) {
.shelf__add {
opacity: 0;
}
.shelf__item:hover .shelf__add,
.shelf__add:focus-visible,
.shelf__add.is-added {
opacity: 1;
}
}
.shelf :focus-visible {
outline: var(--frame) solid var(--paper);
outline-offset: 3px;
}
.shelf__add:focus-visible {
outline-color: var(--night);
outline-offset: -4px;
}
@media (max-width: 52rem) {
.shelf__grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 30rem) {
.shelf__grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (prefers-reduced-motion: reduce) {
.shelf__item,
.shelf__add,
.shelf__all {
transition-duration: 0s;
}
.shelf__item:hover,
.shelf__item:focus-within {
translate: 0 0;
}
}
</style>
<script>
(() => {
const ADDED = "is-added";
const setUpAdd = (button) => {
button.addEventListener("click", () => {
const added = button.classList.toggle(ADDED);
button.setAttribute("aria-pressed", String(added));
});
};
document.querySelectorAll(".shelf").forEach((root) => root.querySelectorAll(".shelf__add").forEach(setUpAdd));
})();
</script>
Dispatches
An inverse (white) section with large framed cards set alternately right and left: an inset archive photograph printed as a night duotone (deep blue shadows, horizon glow lights), a small kind label hanging before a capitals title, two lines of copy and an underlined link.
Code
React For Figma<section class="dispatch">
<h2 class="dispatch__label">The latest</h2>
<article class="dispatch__card">
<a class="dispatch__link" href="#">
<span class="dispatch__picture">
<img class="dispatch__scene" src="assets/steam-tug.jpg" alt="" width="1024" height="816" style="--focus: 50% 52%">
</span>
<h3 class="dispatch__title">
<span class="dispatch__kind">Press</span>
<span class="dispatch__name">Harbour Gazette: the boat that only talks after dark</span>
</h3>
<p class="dispatch__copy">"You tune in for the shipping news and stay for forty minutes of rain on a tin roof," says one listener from the hill above the harbour.</p>
<span class="dispatch__more">Read article</span>
</a>
</article>
<article class="dispatch__card dispatch__card--left">
<a class="dispatch__link" href="#">
<span class="dispatch__picture">
<img class="dispatch__scene" src="assets/radio-operator.jpg" alt="" width="1024" height="828" style="--focus: 50% 40%; --crop: 1.14">
</span>
<h3 class="dispatch__title">
<span class="dispatch__kind">Log</span>
<span class="dispatch__name">Night 1,300: what we learned keeping one signal alive</span>
</h3>
<p class="dispatch__copy">A blown fuse, two storms and a gull in the wheelhouse. Notes from the people who take the desk when everybody else has gone to bed.</p>
<span class="dispatch__more">Read the log</span>
</a>
</article>
</section>
<style>
/* An inverse section: the same frames and type, black on white. */
.dispatch {
display: grid;
gap: var(--section-space);
padding: var(--space-xl) var(--gutter) var(--section-space);
background: var(--paper);
color: var(--night);
}
.dispatch__label {
margin: 0 0 calc(var(--space-xl) - var(--section-space));
font-size: var(--text-m);
font-weight: 400;
text-transform: uppercase;
}
.dispatch__card {
width: min(100%, max(62.5%, 30rem));
margin-left: auto;
border: var(--frame) solid var(--night);
}
.dispatch__card--left {
margin-left: calc(100% / 12);
margin-right: auto;
}
.dispatch__link {
display: grid;
justify-items: start;
gap: var(--space-xs);
padding: var(--space-m);
color: inherit;
text-decoration: none;
}
/* Archive photographs printed as a night duotone: shadows in deep sea blue, lights in horizon glow. */
.dispatch__picture {
position: relative;
display: block;
width: 100%;
aspect-ratio: 640 / 368;
margin-bottom: var(--space-xs);
overflow: hidden;
background: var(--scene-glow);
isolation: isolate;
}
.dispatch__picture::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(180deg, var(--scene-sky), var(--scene-sea));
mix-blend-mode: screen;
pointer-events: none;
}
.dispatch__scene {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: var(--focus, 50% 50%);
filter: grayscale(1) contrast(1.5) brightness(0.74);
mix-blend-mode: multiply;
scale: var(--crop, 1.06);
transition: scale var(--time) ease-out;
}
.dispatch__link:hover .dispatch__scene,
.dispatch__link:focus-visible .dispatch__scene {
scale: calc(var(--crop, 1.06) * var(--zoom));
}
.dispatch__title {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: baseline;
gap: 0.75rem;
margin: 0;
font-weight: 400;
text-transform: uppercase;
}
.dispatch__kind {
color: var(--night-dim);
font-size: var(--text-s);
letter-spacing: 0.08em;
}
.dispatch__name {
font-size: var(--text-l);
letter-spacing: var(--tracking-tight);
line-height: 1.05;
text-wrap: balance;
}
.dispatch__copy {
max-width: 52rem;
margin: var(--space-xs) 0 0;
}
.dispatch__more {
display: inline-flex;
align-items: center;
min-height: var(--tap);
margin-bottom: calc(var(--space-xs) * -1);
text-decoration: underline var(--frame) currentColor;
text-transform: uppercase;
text-underline-offset: 0.4em;
transition: text-decoration-color var(--time-fast) var(--ease-fast);
}
.dispatch__link:hover .dispatch__more,
.dispatch__link:focus-visible .dispatch__more {
text-decoration-color: transparent;
}
.dispatch__link:focus-visible {
outline: var(--frame) solid var(--night);
outline-offset: 4px;
}
@media (max-width: 48rem) {
.dispatch__card--left {
margin-left: 0;
}
.dispatch__title {
grid-template-columns: minmax(0, 1fr);
gap: 0.25rem;
}
}
@media (prefers-reduced-motion: reduce) {
.dispatch__scene,
.dispatch__more {
transition-duration: 0s;
}
.dispatch__link:hover .dispatch__scene,
.dispatch__link:focus-visible .dispatch__scene {
scale: 1;
}
}
</style>
Feed strip
A label on the left, an underlined handle on the right, and a row of five thin-framed tall tiles: drawn posters, a cassette and two archive photographs in the same night duotone. A snapping rail on phones.
Code
React For Figma<section class="feed">
<header class="feed__head">
<h2 class="feed__label">Stay up</h2>
<a class="feed__handle" href="#">@smallhours.radio</a>
</header>
<ul class="feed__rail">
<li class="feed__item">
<a class="feed__tile feed__tile--photo" href="#" aria-label="Photo: a crowd dancing on the quay at night">
<img class="feed__art feed__photo" src="assets/quay-dance.jpg" alt="" width="520" height="402" style="--focus: 40% 50%">
</a>
</li>
<li class="feed__item">
<a class="feed__tile" href="#" aria-label="Poster for the November broadcast">
<svg class="feed__art" viewBox="0 0 240 270" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="feed-fade" x1="0" y1="0" x2="0" y2="1">
<stop class="feed__stop-night" offset="0.5" />
<stop class="feed__stop-shade" offset="1" />
</linearGradient>
</defs>
<rect width="240" height="270" fill="url(#feed-fade)" />
<path class="feed__dots" d="M24 30h.1M58 18h.1M96 44h.1M140 22h.1M214 36h.1M30 96h.1M206 104h.1M16 150h.1M222 160h.1M84 186h.1M168 196h.1" />
<g class="feed__glyph">
<path d="M42 84a26 26 0 0 1 52 0M52 84a16 16 0 0 1 32 0M61 84a7 7 0 0 1 14 0" />
<circle cx="150" cy="128" r="30" />
<circle cx="150" cy="128" r="21" />
<circle cx="150" cy="128" r="12" />
<path d="M150 128l24-18" />
<path d="M56 150h56l-8 16H64zM84 150v-34M84 120l18 22" />
<path d="M196 52v12M190 58h12M110 204v10M105 209h10" />
</g>
<path class="feed__solid" d="M186 70a20 20 0 1 0 24 26 17 17 0 0 1-24-26z" />
<circle class="feed__solid" cx="150" cy="128" r="3" />
<text class="feed__script feed__script--dark" x="16" y="246">Small Hours</text>
<text class="feed__small feed__small--dark" x="18" y="260">Nov 28th 11:00pm</text>
</svg>
</a>
</li>
<li class="feed__item">
<a class="feed__tile feed__tile--photo" href="#" aria-label="Photo: the island light under a storm">
<img class="feed__art feed__photo" src="assets/island-light.jpg" alt="" width="700" height="394" style="--focus: 62% 50%">
</a>
</li>
<li class="feed__item">
<a class="feed__tile" href="#" aria-label="Poster for the October broadcast">
<svg class="feed__art" viewBox="0 0 240 270" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="feed-rise" x1="0" y1="0" x2="0" y2="1">
<stop class="feed__stop-clear" offset="0.72" />
<stop class="feed__stop-paper" offset="1" />
</linearGradient>
</defs>
<rect class="feed__ground" width="240" height="270" />
<path class="feed__dots" d="M20 40h.1M222 28h.1M34 126h.1M208 118h.1M26 190h.1M214 184h.1M58 152h.1M186 148h.1M72 108h.1M170 214h.1" />
<text class="feed__script" x="120" y="44" text-anchor="middle">Small Hours</text>
<text class="feed__small" x="120" y="62" text-anchor="middle">October 17th 10:30pm</text>
<text class="feed__small" x="120" y="75" text-anchor="middle">Pier Nine, east steps</text>
<text class="feed__small" x="120" y="88" text-anchor="middle">Fog Set feat. O. Marr</text>
<g class="feed__glyph">
<circle cx="120" cy="156" r="44" />
<circle cx="120" cy="156" r="33" />
<circle cx="120" cy="156" r="22" />
<circle cx="120" cy="156" r="11" />
<path d="M120 156l38-22" />
</g>
<circle class="feed__solid" cx="120" cy="156" r="3" />
<rect width="240" height="270" fill="url(#feed-rise)" />
<path class="feed__skyline" d="M0 270v-18h22v-12h14v12h30v-22h10v22h36l8-34 8 34h30v-14h18v14h24v-24h12v24h28v18z" />
</svg>
</a>
</li>
<li class="feed__item">
<a class="feed__tile feed__tile--white" href="#" aria-label="Photo: tape 014 from the shop">
<svg class="feed__art" viewBox="0 0 240 270" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<g transform="rotate(-8 120 135)">
<rect class="feed__ground" x="36" y="78" width="168" height="110" rx="9" />
<rect class="feed__label-paper" x="52" y="92" width="136" height="60" rx="3" />
<rect class="feed__ground" x="74" y="118" width="92" height="24" rx="12" />
<circle class="feed__hole" cx="90" cy="130" r="7" />
<circle class="feed__hole" cx="150" cy="130" r="7" />
<path class="feed__seam" d="M72 188l9-24h78l9 24" />
<text class="feed__script feed__script--tape" x="120" y="111" text-anchor="middle">Fog Set</text>
</g>
</svg>
</a>
</li>
</ul>
</section>
<style>
.feed {
padding: var(--space-l) 0 var(--section-space);
background: var(--night);
color: var(--paper);
}
.feed__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-s);
margin-bottom: var(--space-m);
padding: 0 var(--gutter);
}
.feed__label {
margin: 0;
font-size: inherit;
font-weight: 400;
text-transform: uppercase;
}
.feed__handle {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: inherit;
text-decoration: underline var(--frame) currentColor;
text-transform: uppercase;
text-underline-offset: 0.4em;
transition: text-decoration-color var(--time-fast) var(--ease-fast);
}
.feed__handle:hover,
.feed__handle:focus-visible {
text-decoration-color: transparent;
}
.feed__rail {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: var(--gap);
margin: 0;
padding: 0 var(--gutter);
list-style: none;
}
.feed__tile {
display: block;
aspect-ratio: 8 / 9;
overflow: hidden;
border: var(--frame) solid var(--paper);
background: var(--night);
}
.feed__tile--white {
background: var(--paper);
}
.feed__tile:focus-visible {
outline: var(--frame) solid var(--paper);
outline-offset: 3px;
}
.feed__art {
display: block;
width: 100%;
height: 100%;
transition: scale var(--time) ease-out;
}
.feed__tile:hover .feed__art,
.feed__tile:focus-visible .feed__art {
scale: var(--zoom);
}
/* Archive photographs as a night duotone, like the dispatch cards. */
.feed__tile--photo {
position: relative;
background: var(--scene-glow);
isolation: isolate;
}
.feed__tile--photo::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(180deg, var(--night), var(--scene-sky));
mix-blend-mode: screen;
pointer-events: none;
}
.feed__photo {
object-fit: cover;
object-position: var(--focus, 50% 50%);
filter: grayscale(1) contrast(1.4) brightness(0.85);
mix-blend-mode: multiply;
}
/* Drawn pictures. */
.feed__stop-night {
stop-color: var(--night);
}
.feed__stop-sky {
stop-color: var(--scene-sky);
}
.feed__stop-glow {
stop-color: var(--scene-glow);
}
.feed__stop-shade {
stop-color: var(--wordmark-shade);
}
.feed__stop-paper {
stop-color: var(--paper);
}
.feed__stop-clear {
stop-color: var(--paper);
stop-opacity: 0;
}
.feed__ground,
.feed__crowd,
.feed__roof,
.feed__skyline {
fill: var(--night);
}
.feed__crowd-far {
fill: var(--scene-sea);
}
.feed__wire,
.feed__gulls {
fill: none;
stroke: var(--paper-dim);
stroke-width: 1;
}
.feed__gulls {
stroke: var(--night);
stroke-linecap: round;
stroke-width: 1.5;
}
.feed__bulbs,
.feed__dots {
fill: none;
stroke: var(--scene-amber);
stroke-linecap: round;
stroke-width: 5;
}
.feed__dots {
stroke: var(--paper);
stroke-width: 1.6;
}
.feed__bokeh {
fill: var(--scene-amber);
opacity: 0.32;
}
.feed__bokeh--red,
.feed__lamp,
.feed__halo {
fill: var(--scene-lamp);
}
.feed__halo {
opacity: 0.3;
}
.feed__rig {
fill: none;
stroke: var(--night);
stroke-width: 2.5;
}
.feed__lit {
fill: var(--scene-amber);
}
.feed__glyph {
fill: none;
stroke: var(--paper);
stroke-linejoin: round;
stroke-width: 1.6;
}
.feed__solid,
.feed__hole {
fill: var(--paper);
}
.feed__label-paper {
fill: var(--wordmark-shade);
}
.feed__seam {
fill: none;
stroke: var(--smoke);
stroke-width: 2;
}
.feed__script {
fill: var(--paper);
font: italic 700 30px var(--font-script);
}
.feed__script--dark,
.feed__script--tape {
fill: var(--night);
}
.feed__script--tape {
font-size: 16px;
}
.feed__small {
fill: var(--paper);
font: 500 9.5px var(--font-label);
}
.feed__small--dark {
fill: var(--night);
}
/* Below tablet width the row becomes a rail that snaps tile by tile. */
@media (max-width: 48rem) {
.feed__rail {
grid-auto-columns: min(72vw, 20rem);
grid-auto-flow: column;
grid-template-columns: none;
overflow-x: auto;
overscroll-behavior-x: contain;
scroll-padding-inline: var(--gutter);
scroll-snap-type: x mandatory;
scrollbar-width: none;
}
.feed__item {
scroll-snap-align: start;
}
}
@media (prefers-reduced-motion: reduce) {
.feed__art,
.feed__handle {
transition-duration: 0s;
}
.feed__tile:hover .feed__art,
.feed__tile:focus-visible .feed__art {
scale: 1;
}
}
</style>
Footer
Link list and a one-line sign-up field with an arrow that validates in place, the script wordmark as wide as the page with a soft gradient, and a legal row with round icon links.
Code
React For Figma<footer class="footer">
<div class="footer__top">
<nav class="footer__explore" aria-label="Footer">
<h2 class="footer__heading">Explore</h2>
<ul class="footer__list">
<li><a class="footer__link" href="#">Shop</a></li>
<li><a class="footer__link" href="#">The Boat</a></li>
<li><a class="footer__link" href="#">Night Schedule</a></li>
</ul>
</nav>
<form class="footer__form" novalidate>
<h2 class="footer__heading">The kettle is on…</h2>
<div class="footer__field">
<input class="footer__input" type="email" name="email" autocomplete="email" placeholder="Email address" aria-label="Email address" required />
<button class="footer__send" type="submit" aria-label="Sign up">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M4 12h16M14 6l6 6-6 6" /></svg>
</button>
</div>
<p class="footer__status" role="status"></p>
</form>
</div>
<div class="footer__wordmark" aria-hidden="true">
<svg class="footer__type" viewBox="-2 0 496 114" focusable="false">
<defs>
<linearGradient id="footer-fade" gradientUnits="userSpaceOnUse" x1="0" y1="30" x2="0" y2="112">
<stop class="footer__stop-top" offset="0.2" />
<stop class="footer__stop-end" offset="1" />
</linearGradient>
<filter id="footer-melt" x="-2%" y="-8%" width="104%" height="116%" color-interpolation-filters="sRGB">
<feTurbulence type="fractalNoise" baseFrequency="0.025" numOctaves="2" seed="11" result="wobble" />
<feDisplacementMap in="SourceGraphic" in2="wobble" scale="9" xChannelSelector="R" yChannelSelector="G" />
<feGaussianBlur stdDeviation="1.5" />
<feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 14 -6" />
</filter>
</defs>
<g fill="url(#footer-fade)" stroke="url(#footer-fade)" filter="url(#footer-melt)">
<path class="footer__signal" d="M229 30a18 18 0 0 1 36 0M237 30a10 10 0 0 1 20 0" />
<circle class="footer__spark" cx="247" cy="29" r="3" />
<text class="footer__script" x="0" y="108" textLength="496.4" lengthAdjust="spacingAndGlyphs">Small Hours</text>
</g>
</svg>
</div>
<div class="footer__legal">
<p class="footer__rights">© 2026 Small Hours <a class="footer__credit" href="#">Credits.</a></p>
<ul class="footer__policies">
<li><a class="footer__policy" href="#">Broadcast Notice</a></li>
<li><a class="footer__policy" href="#">Privacy Policy</a></li>
<li><a class="footer__policy" href="#">Terms of Service</a></li>
</ul>
<ul class="footer__social">
<li>
<a class="footer__icon" href="#" aria-label="Listen live">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9" /><path d="M10 8.5v7l6-3.5z" /></svg>
</a>
</li>
<li>
<a class="footer__icon" href="#" aria-label="Podcast feed">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5 11a8 8 0 0 1 8 8M5 5a14 14 0 0 1 14 14" /><circle cx="6" cy="18" r="1.5" /></svg>
</a>
</li>
<li>
<a class="footer__icon" href="#" aria-label="Write to the boat">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3" y="5.5" width="18" height="13" rx="2" /><path d="M3.5 7l8.5 6.5L20.5 7" /></svg>
</a>
</li>
</ul>
</div>
</footer>
<style>
.footer {
overflow: hidden;
background: var(--night);
color: var(--paper);
}
.footer__top {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-xl) var(--space-m);
padding: var(--space-xl) var(--gutter) var(--space-l);
}
.footer__heading {
margin: 0 0 var(--space-s);
font-size: var(--text-m);
font-weight: 400;
text-transform: uppercase;
}
.footer__list,
.footer__policies,
.footer__social {
margin: 0;
padding: 0;
list-style: none;
}
.footer__link,
.footer__policy,
.footer__credit {
display: inline-flex;
align-items: center;
color: inherit;
text-decoration: underline var(--frame) transparent;
text-underline-offset: 0.4em;
transition: text-decoration-color var(--time-fast) var(--ease-fast), color var(--time-fast) var(--ease-fast);
}
.footer__link {
min-width: var(--tap);
min-height: var(--tap);
margin-block: -0.4375rem;
}
.footer__link:hover,
.footer__link:focus-visible,
.footer__policy:hover,
.footer__policy:focus-visible {
text-decoration-color: currentColor;
}
/* The field is one underline with an arrow at its end. */
.footer__field {
display: flex;
align-items: center;
border-bottom: var(--frame) solid var(--paper-dim);
transition: border-color var(--time-fast) var(--ease-fast);
}
.footer__field:focus-within {
border-color: var(--paper);
}
.footer__form.is-wrong .footer__field {
border-color: var(--map-live);
}
.footer__input {
flex: 1;
min-width: 0;
height: var(--tap);
padding: 0;
border: 0;
outline: 0;
background: none;
color: inherit;
font: inherit;
}
.footer__input::placeholder {
color: var(--paper-dim);
opacity: 1;
}
.footer__send {
display: grid;
place-items: center;
width: var(--tap);
height: var(--tap);
padding: 0;
border: 0;
background: none;
color: inherit;
cursor: pointer;
transition: translate var(--time) var(--ease-out);
}
.footer__send:hover,
.footer__send:focus-visible {
translate: var(--lift) 0;
}
.footer__send svg,
.footer__icon svg {
width: 1.5rem;
height: 1.5rem;
fill: none;
stroke: currentColor;
stroke-linejoin: round;
stroke-width: 1.25;
}
.footer__status {
min-height: 1.4em;
margin: var(--space-xs) 0 0;
color: var(--paper-dim);
}
.footer__form.is-wrong .footer__status {
color: var(--map-live);
}
/* The wordmark is drawn at a known size and stretched to the width of the page.
Its filter pushes the outline about, then blurs and hardens it, so the letters look melted. */
.footer__wordmark {
padding: var(--space-s) calc(var(--gutter) / 2) 0;
}
.footer__type {
display: block;
width: 100%;
overflow: visible;
}
.footer__stop-top {
stop-color: var(--paper);
}
.footer__stop-end {
stop-color: var(--wordmark-shade);
}
.footer__script {
stroke: none;
font: italic 700 100px var(--font-script);
}
.footer__signal {
fill: none;
stroke-linecap: round;
stroke-width: 4.5;
}
.footer__spark {
stroke: none;
}
.footer__legal {
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: center;
gap: var(--space-s) var(--space-m);
padding: var(--space-xl) var(--gutter) var(--space-l);
color: var(--paper-dim);
}
.footer__rights {
margin: 0;
}
.footer__credit {
min-height: var(--tap);
text-decoration-color: currentColor;
text-transform: uppercase;
}
.footer__credit:hover,
.footer__credit:focus-visible {
color: var(--paper);
}
.footer__policies {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0 var(--space-s);
}
.footer__policy {
min-height: var(--tap);
}
.footer__social {
display: flex;
justify-content: flex-end;
margin-right: -0.625rem;
}
.footer__icon {
display: grid;
place-items: center;
width: var(--tap);
height: var(--tap);
border-radius: var(--radius-pill);
color: var(--paper);
transition: opacity var(--time) ease;
}
.footer__icon:hover,
.footer__icon:focus-visible {
opacity: 0.6;
}
.footer :focus-visible {
outline: var(--frame) solid currentColor;
outline-offset: 3px;
}
.footer__input:focus-visible {
outline: 0;
}
@media (max-width: 48rem) {
.footer__top {
grid-template-columns: minmax(0, 1fr);
}
.footer__legal {
grid-template-columns: minmax(0, 1fr);
justify-items: center;
padding-top: var(--space-l);
text-align: center;
}
.footer__social {
margin-right: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.footer__send,
.footer__icon,
.footer__link,
.footer__policy,
.footer__credit,
.footer__field {
transition-duration: 0s;
}
.footer__send:hover,
.footer__send:focus-visible {
translate: 0 0;
}
}
</style>
<script>
(() => {
const WRONG = "is-wrong";
const SENT_TEXT = "You are on the list. Listen for us after dark.";
const WRONG_TEXT = "That address does not look right.";
const setUpForm = (form) => {
const input = form.querySelector(".footer__input");
const status = form.querySelector(".footer__status");
const report = (valid) => {
form.classList.toggle(WRONG, !valid);
input.setAttribute("aria-invalid", String(!valid));
status.textContent = valid ? SENT_TEXT : WRONG_TEXT;
};
form.addEventListener("submit", (event) => {
event.preventDefault();
const valid = input.value.trim() !== "" && input.checkValidity();
report(valid);
if (valid) form.reset();
});
};
document.querySelectorAll(".footer").forEach((root) => setUpForm(root.querySelector(".footer__form")));
})();
</script>
Style
- --night #000000
- --paper #ffffff
- --paper-dim rgba(255, 255, 255, 0.6)
- --paper-faint rgba(255, 255, 255, 0.36)
- --night-dim rgba(0, 0, 0, 0.6)
- --night-faint rgba(0, 0, 0, 0.4)
- --smoke #333333
- --fog #f3f3f3
- --wordmark-shade #cfcfcf
- --map-line #8380cf
- --map-live #e8aaa8
- --map-ghost #9a9a9a
- --retro-face #c0c0c0
- --retro-chip #efefef
- --retro-edge #6f6f6f
- --retro-bar #000080
- --retro-bar-end #1084d0
- --scene-sky #26356f
- --scene-glow #f1b28c
- --scene-sea #0b1230
- --scene-lamp #ff5a3c
- --scene-amber #f4c95d
Type
- Geist Mono 400 and 700 for everything set in type: navigation, copy, readouts, headings, stands in for the system monospace of Apple machines
- Lobster Two 700 italic for the wordmark, and its print on merchandise, stands in for a hand-drawn fat italic script logo with swash capitals and soft, melted edges
- Arimo 500 for point labels on the map, small print on posters, stands in for the plain system sans a third-party map widget draws its labels in
Motion
- The map creeps sideways at about 5 units a second while on screen and follows the pointer when dragged; arrow keys move it too. It stands still under reduced motion.
- The day and night switch slides its knob in 0.25s while the section swaps black and white over 0.6s with a plain ease; the map is inverted in the same 0.6s.
- The clock in the readout ticks every second.
- The retro help window fades in and rises 6px in 0.25s; floating frames fade out in 0.25s when dismissed.
- Small tiles rise 4px in 0.25s on hover with ease-out, and a round add button fades in; framed pictures grow by 3%.
- The filled button swaps white for dark grey over 0.6s. Hovering a navigation link dims the others in its group to 60% in 0.3s; text links elsewhere only change their underline, in 0.125s.
- On phones the menu is a black full screen; its links rise 12px and fade in 40ms apart.
Rules
- The page is pure black with pure white type. Second-level text is the same white at 60%, third-level at 36%. Inverse sections swap the two.
- One monospace face does everything at 12px on desktop and 14px on phones; hierarchy comes from capitals, tracking and opacity, not weight.
- Headings and readout values are capitals with tight tracking (-0.03em); small labels are capitals with wide tracking (0.2em).
- Boxes are drawn with a 1px frame in the text colour, square corners, no shadow and no fill other than the ground colour. A frame may hold another frame.
- Pictures of things for sale sit on a white square; the caption is its own framed box under it.
- The only colour on the page is in the map: periwinkle lines, one pink point, one grey point. Drawn pictures may use a dusk palette.
- The script face is used for the wordmark alone, small in the bar and as wide as the page in the footer, with a faint white to grey gradient.
- The navigation bar lies over the section below it and is blended as a difference, so it stays readable on black and on white.
- One deliberate anachronism: a bevelled grey help button and window with a blue title bar. Use it once.
- Fields are a single underline with an arrow at the end, never a box.
base.css
@import url("https://fonts.googleapis.com/css2?family=Arimo:wght@500&family=Geist+Mono:wght@400;700&family=Lobster+Two:ital,wght@1,700&display=swap");
:root {
--night: #000000; /* page background, text on white */
--paper: #ffffff; /* text, frames, the filled button, picture boxes, inverse sections */
--paper-dim: rgba(255, 255, 255, 0.6); /* second-level text on black: readout labels, legal line, placeholders */
--paper-faint: rgba(255, 255, 255, 0.36); /* third-level text on black: date and position under the clock */
--night-dim: rgba(0, 0, 0, 0.6); /* second-level text on white */
--night-faint: rgba(0, 0, 0, 0.4); /* third-level text on white */
--smoke: #333333; /* the filled button on hover */
--fog: #f3f3f3; /* light grey panels */
--wordmark-shade: #cfcfcf; /* bottom of the gradient on the big wordmark, print on merchandise */
--map-line: #8380cf; /* lines between points on the map */
--map-live: #e8aaa8; /* the one live point on the map and its label */
--map-ghost: #9a9a9a; /* the large grey point on the map and its label */
--retro-face: #c0c0c0; /* retro help window body */
--retro-chip: #efefef; /* retro help button face, close chips */
--retro-edge: #6f6f6f; /* dark bevel edge on retro pieces */
--retro-bar: #000080; /* retro window title bar, left end */
--retro-bar-end: #1084d0; /* retro window title bar, right end */
--scene-sky: #26356f; /* drawn pictures: dusk sky */
--scene-glow: #f1b28c; /* drawn pictures: horizon glow */
--scene-sea: #0b1230; /* drawn pictures: water and deep shadow */
--scene-lamp: #ff5a3c; /* drawn pictures: red warning lamps */
--scene-amber: #f4c95d; /* drawn pictures: lit windows and dials */
--font-mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace; /* everything set in type on the page */
--font-script: "Lobster Two", "Brush Script MT", cursive; /* the wordmark only */
--font-label: "Arimo", "Helvetica Neue", Arial, sans-serif; /* point labels on the map, poster small print */
--text-xs: 0.6875rem; /* readout labels with wide tracking, retro window */
--text-s: clamp(0.75rem, 1.05rem - 0.4vw, 0.875rem); /* body, navigation, captions: 12px on desktop, 14px on phones */
--text-m: 0.875rem; /* small headings above lists and fields */
--text-l: clamp(1.25rem, 1.15rem + 0.3vw, 1.5rem); /* card headings, readout values */
--text-xl: clamp(1.625rem, 0.95rem + 2.4vw, 3rem); /* statements, phone menu links */
--tracking-wide: 0.2em; /* readout labels */
--tracking-tight: -0.03em; /* headings and readout values */
--gutter: clamp(1rem, 2.8vw, 2.5rem); /* side padding of the page */
--gap: 0.625rem; /* between tiles in a row */
--space-xs: 0.5rem; /* between a heading and its line of copy */
--space-s: 1rem; /* between lines of one block */
--space-m: 1.25rem; /* padding inside framed cards, between links in a row */
--space-l: 1.875rem; /* padding inside the large framed card */
--space-xl: 3rem; /* between blocks inside a section */
--section-space: clamp(3rem, 2rem + 4vw, 5rem); /* vertical room around sections */
--tap: 2.75rem; /* smallest height of anything tappable */
--bar-height: clamp(5.5rem, 3.6rem + 7.8vw, 10rem); /* navigation bar, which lies over the section below it */
--frame: 1px; /* every frame, box edge and rule */
--radius-chip: 2px; /* retro button, close chips */
--radius-pill: 999px; /* the day and night switch, round icon buttons */
--time-fast: 0.125s; /* link underlines and colours */
--time: 0.25s; /* hover lift, pop-up windows, switch knob */
--time-nav: 0.3s; /* navigation links dimming around the hovered one */
--time-slow: 0.6s; /* button fills, the map turning from night to day */
--ease-fast: ease-in-out; /* link underlines and colours */
--ease-out: cubic-bezier(0.33, 1, 0.68, 1); /* lifts, knob, menu */
--lift: 4px; /* how far a tile rises on hover */
--zoom: 1.03; /* how much a picture grows on hover */
--stagger-step: 0.04s; /* wait between menu links */
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--night);
color: var(--paper);
font-family: var(--font-mono);
font-size: var(--text-s);
font-weight: 400;
line-height: 1.4;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
For your agent
Use the kitbash MCP server at https://kitbash.me/mcp. Call get_pack("night-chart-console"), then get_component for the parts you need, and build my site in that style: keep its tokens and rules, replace the placeholder copy with mine.
How to connect