Skip to content

Isometric line figures that answer the pointer. For React and for anything with a DOM.

Inspo: a page on how Hairline was made, from a long brief through the pushback to the package

Lucas Marquesa0c2c4e0deed
diff --git a/apps/site/app/globals.css b/apps/site/app/globals.css
index 9325ca4..9cdc864 100644
--- a/apps/site/app/globals.css
+++ b/apps/site/app/globals.css
@@ -226,6 +226,46 @@ a.topbar-link:hover { color: var(--color-ink); }
.s-range { flex: 1; width: auto; }
}
+/* Inspo: one column, prose at a reading measure, pictures on the dark plate they were taken on. */
+.inspo { --gutter: clamp(18px, 5vw, 28px); display: grid; gap: 72px; max-width: 1080px; margin: 0 auto; padding: 64px var(--gutter) 96px; }
+.inspo > * { min-width: 0; }
+.inspo-prose, .inspo-step > :not(.inspo-figure, .inspo-split) { width: 100%; max-width: 640px; }
+.inspo-label { font: 400 12px/1 var(--font-mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--color-muted); }
+.inspo-title { margin-top: 16px; font-size: 40px; font-weight: 500; line-height: 1.05; letter-spacing: -0.04em; text-wrap: balance; }
+.inspo-lede { margin-top: 20px; font-size: 18px; line-height: 1.5; color: var(--color-muted); text-wrap: pretty; }
+.inspo-step { display: grid; gap: 20px; }
+.inspo-step > * { min-width: 0; }
+.inspo-h2 { display: flex; align-items: baseline; gap: 12px; font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
+.inspo-n { font: 400 13px/1 var(--font-mono); letter-spacing: 0; color: var(--color-faint); font-variant-numeric: tabular-nums; }
+.inspo-p { font-size: 16px; line-height: 1.6; text-wrap: pretty; }
+.inspo-prompt { padding: 16px 18px; border-radius: 12px; background: var(--color-stone); }
+.inspo-quote { display: grid; gap: 14px; margin-top: 18px; font-size: 16px; line-height: 1.55; text-wrap: pretty; }
+.inspo-part { display: grid; gap: 8px; }
+.inspo-pushback { display: grid; gap: 0; counter-reset: turn; }
+.inspo-pushback li { display: grid; gap: 8px; padding: 18px 0 18px 36px; border-top: 1px solid var(--color-line); counter-increment: turn; position: relative; }
+.inspo-pushback li:last-child { border-bottom: 1px solid var(--color-line); }
+.inspo-pushback li::before { content: counter(turn, decimal-leading-zero); position: absolute; top: 22px; left: 0; font: 400 13px/1 var(--font-mono); color: var(--color-faint); font-variant-numeric: tabular-nums; }
+.inspo-said { font-size: 16px; line-height: 1.55; text-wrap: pretty; }
+.inspo-changed { font-size: 14px; line-height: 1.55; color: var(--color-muted); text-wrap: pretty; }
+.inspo-changed::before { content: "Changed: "; color: var(--color-ink); font-weight: 500; }
+.inspo-figure { display: grid; gap: 10px; margin-top: 8px; }
+.inspo-shot { padding: clamp(8px, 2vw, 16px); border-radius: 18px; background: var(--color-ink); }
+.inspo-shot img { display: block; width: 100%; height: auto; border-radius: 8px; }
+.inspo-caption { font-size: 13px; line-height: 1.5; color: var(--color-muted); }
+.inspo-split { display: grid; gap: 20px; align-items: start; }
+.inspo-split-text { display: grid; gap: 16px; max-width: 640px; }
+.inspo-split .inspo-figure { margin-top: 0; max-width: 480px; }
+.inspo-rules { display: grid; gap: 16px; }
+.inspo-rules li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding-top: 16px; border-top: 1px solid var(--color-line); }
+.inspo-rules .inspo-n { line-height: 1.6; }
+.inspo-rule { font-size: 16px; font-weight: 500; line-height: 1.5; }
+.inspo-keep { display: grid; gap: 12px; padding-left: 1.2em; list-style: disc; font-size: 16px; line-height: 1.6; text-wrap: pretty; }
+@media (min-width: 768px) {
+ .inspo { gap: 96px; padding-top: 96px; }
+ .inspo-title { font-size: 56px; }
+ .inspo-split { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; }
+}
+
:is(button, a, input, .code-body, .table-scroll):focus-visible { outline: 1.5px solid var(--color-ink); outline-offset: 2px; }
@media (max-width: 640px) {
diff --git a/apps/site/app/inspo/page.tsx b/apps/site/app/inspo/page.tsx
new file mode 100644
index 0000000..c0b8406
--- /dev/null
+++ b/apps/site/app/inspo/page.tsx
@@ -0,0 +1,237 @@
+import type { Metadata } from "next";
+import Image, { type StaticImageData } from "next/image";
+import type { ReactNode } from "react";
+import { Footer, Topbar } from "@/components/chrome";
+import craft from "@/public/inspo/craft.webp";
+import dissection from "@/public/inspo/dissection.webp";
+import figures from "@/public/inspo/figures.webp";
+import linear from "@/public/inspo/linear.webp";
+import tune from "@/public/inspo/tune.webp";
+
+const TITLE = "How Hairline was made";
+const DESCRIPTION = "A long brief, a lot of arguing, and every correction written down as a rule: how Hairline was designed with Claude Opus and a live Artifact.";
+
+export const metadata: Metadata = {
+ title: `${TITLE} · hairline`,
+ description: DESCRIPTION,
+ alternates: { canonical: "/inspo" },
+ openGraph: { title: TITLE, description: DESCRIPTION, url: "/inspo", siteName: "hairline", type: "article", images: [{ url: "/og.png", width: 1200, height: 630, alt: "Line drawings that answer the pointer: the Terrain figure, its pillars rising." }] },
+};
+
+/** One part of the story: a mono number and a title over the prose. */
+function Step({ n, title, children }: { n: number; title: string; children: ReactNode }) {
+ return (
+ <section data-step aria-labelledby={`step-${n}`} className="inspo-step">
+ <h2 id={`step-${n}`} className="inspo-h2">
+ <span className="inspo-n">{String(n).padStart(2, "0")}</span>
+ {title}
+ </h2>
+ {children}
+ </section>
+ );
+}
+
+/** What I asked, in words close to the ones I used. A long prompt keeps its parts, each under a small label. */
+function Prompt({ label, children }: { label: string; children: ReactNode }) {
+ return (
+ <figure className="inspo-prompt">
+ <figcaption className="inspo-label">{label}</figcaption>
+ <blockquote className="inspo-quote">{children}</blockquote>
+ </figure>
+ );
+}
+
+const Part = ({ name, children }: { name: string; children: ReactNode }) => (
+ <div className="inspo-part">
+ <p className="inspo-label">{name}</p>
+ <p>{children}</p>
+ </div>
+);
+
+/** A picture on the dark plate it was taken on. */
+function Shot({ src, alt, caption, priority }: { src: StaticImageData; alt: string; caption: string; priority?: boolean }) {
+ return (
+ <figure className="inspo-figure">
+ <div className="inspo-shot">
+ {/* already webp at 2x and small, so served as they are */}
+ <Image src={src} alt={alt} priority={priority} unoptimized />
+ </div>
+ <figcaption className="inspo-caption">{caption}</figcaption>
+ </figure>
+ );
+}
+
+/** Each time I pushed back: what I said, and what it changed. */
+const PUSHBACK = [
+ {
+ said: "You say a 50ms stagger feels calm. Calm compared to what? Put it on a slider so I can feel 20 and 120, and tell me where it stops reading as a stack and starts reading as a wave.",
+ changed: "Every figure got a slider for the one number that shapes it, and the claims became something I could check by hand.",
+ },
+ {
+ said: "Why is the falloff three steps instead of a curve? If the steps matter, show me the curve next to them and tell me what breaks.",
+ changed: "The steps stayed, as ratios: 1, then .31 at 42% of the radius, then .09 at the edge. Terrain uses them in two dimensions.",
+ },
+ {
+ said: "At rest, Terrain is a flat floor. A flat floor is dead. Give it a shape before anyone touches it.",
+ changed: "The field rests as a designed dune with two rises, and every pillar settles back to it on its own spring.",
+ },
+ {
+ said: "Riffle reads as a menu and Exploded reads as a screenshot. What does each one mean inside a product? If you can't say it in a line, change the figure, not the line.",
+ changed: "Each figure got a job written under it, and the rules it leans on. Anything that couldn't name one was redrawn.",
+ },
+ {
+ said: "Slow's gate blinks on and off under the lintel. It should breathe: brighten as a crate comes, let go as it leaves.",
+ changed: "The glow swells over the whole gap between crates and lets go twice as fast as it lights. That one took three rounds.",
+ },
+];
+
+/**
+ * The story behind the package, told in steps: a feeling worth explaining, a long brief, what came back, the arguing,
+ * a pass of taste, then the package. Prose keeps to a reading measure; the pictures take the page's width.
+ */
+export default function Inspo() {
+ return (
+ <>
+ <Topbar />
+ <main className="inspo">
+ <header className="inspo-prose">
+ <p className="inspo-label">Inspo</p>
+ <h1 className="inspo-title">{TITLE}</h1>
+ <p className="inspo-lede">
+ Not with one prompt. With a long brief, a lot of questions, and every correction written down as a rule so it couldn&rsquo;t come back. Claude Opus did the building, a live Artifact was the bench, and the judgement stayed with me.
+ </p>
+ </header>
+
+ <Step n={1} title="A feeling, not a look">
+ <p className="inspo-p">
+ I&rsquo;d been collecting interfaces that feel alive without moving much. One was a section of linear.app: three small line figures that answer the pointer so quietly you only notice late that they&rsquo;ve been listening the whole time.
+ </p>
+ <p className="inspo-p">
+ I didn&rsquo;t want those figures. I wanted to know why the feeling works, so I could build my own on purpose instead of by imitation.
+ </p>
+ <Shot src={linear} priority alt="Linear's three line figures, Fig 0.1 to 0.3, drawn in thin grey strokes on near-black: a stack of rounded layers with a sun on top, a cluster of rounded cubes, and a row of plates rising in height." caption="The reference, for the feeling: Fig 0.1 to 0.3 on linear.app." />
+ </Step>
+
+ <Step n={2} title="The brief">
+ <p className="inspo-p">
+ The first prompt was long, and most of it wasn&rsquo;t about drawing. It said what I was making, what I wanted to understand first, what was off limits, and what shape the answer had to take.
+ </p>
+ <Prompt label="The brief, paraphrased">
+ <Part name="What I'm making">
+ A small library of isometric line figures for product interfaces, drawn in SVG, that respond to the pointer. Not illustrations that sit there: instruments that read the cursor.
+ </Part>
+ <Part name="Understand first">
+ The attached section is a reference for a feeling, not a look. Before you draw anything, take it apart. Give me numbers, not adjectives: timing, stagger, easing, how the response falls off with distance, how the frames are stored. Then tell me which of those choices make it feel calm.
+ </Part>
+ <Part name="Then rules">
+ Turn what you find into rules I can hold a figure to, each sharp enough that I could reject a figure with it.
+ </Part>
+ <Part name="Then figures">
+ Six at most. Each needs a reason to exist in a product, a way of answering the pointer, and the rules it leans on.
+ </Part>
+ <Part name="Off limits">
+ Nothing of the reference survives: not its subjects, its frames or its code. One stroke width. No dependencies. Every figure holds up at 240px wide.
+ </Part>
+ <Part name="Shape of the answer">One Artifact I can play with, not a document I have to read.</Part>
+ </Prompt>
+ </Step>
+
+ <Step n={3} title="What came back">
+ <p className="inspo-p">
+ A dissection first, as asked: a 50ms stagger, one 700ms curve, <code className="doc-code">cubic-bezier(.32, .72, 0, 1)</code>, a falloff that drops from 128 to 40 to 12 away from the pointer, frames stored as 25-bit masks. Then eight rules, and six figures built on them: Riffle, Terrain, Exploded, Phosphor, Slow and Turntable.
+ </p>
+ <Shot src={dissection} alt="Three spec cards from the first Artifact: a timeline of the 50 millisecond stagger, a grid of 25-bit animation frames, and a chart of the falloff from 128 to 40 to 12." caption="The dissection: stagger, frames and falloff, measured." />
+ <p className="inspo-p">A good first draft. That&rsquo;s all it was: something to argue with.</p>
+ <Shot src={figures} alt="The six first-draft figures in a three by two grid of dark cards: a riffle of index cards, a field of pillars, an exploded stack of screens, a tile of lit dots, crates passing under a gate, and a turntable of blocks." caption="The first six figures, before any of the arguing." />
+ </Step>
+
+ <Step n={4} title="Pushback">
+ <p className="inspo-p">
+ Most of the work happened here. I questioned every number I couldn&rsquo;t feel, every figure I couldn&rsquo;t explain, and every motion that looked fine in a still and wrong under the hand. A few of those turns:
+ </p>
+ <ol className="inspo-pushback" data-pushback>
+ {PUSHBACK.map((p) => (
+ <li key={p.said}>
+ <p className="inspo-said">&ldquo;{p.said}&rdquo;</p>
+ <p className="inspo-changed" data-changed>{p.changed}</p>
+ </li>
+ ))}
+ </ol>
+ <div className="inspo-split">
+ <div className="inspo-split-text">
+ <p className="inspo-p">
+ Asking for sliders was the turn that paid most. Once the Artifact was a bench instead of a document, I stopped reading claims and started judging by hand: drag the knob, move the pointer, say exactly what feels off.
+ </p>
+ <p className="inspo-p">
+ Those knobs later collapsed into a single option, <code className="doc-code">intensity</code>.
+ </p>
+ </div>
+ <Shot src={tune} alt="The Terrain figure in the first Artifact, mid-hover: a few pillars raised bright near the pointer, a note on its radial falloff underneath, and a slider set to a radius of 3 cells." caption="Terrain on the bench, its radius on a slider." />
+ </div>
+ </Step>
+
+ <Step n={5} title="The design pass">
+ <p className="inspo-p">
+ The motion was right; the drawings weren&rsquo;t mine yet. A model won&rsquo;t flag that on its own, so I wrote the critique the way I&rsquo;d give it to a designer: what&rsquo;s wrong, why, and the exact fix.
+ </p>
+ <Prompt label="The critique, paraphrased">
+ <Part name="Keep">The motion. Don&rsquo;t touch timing, easing or falloff.</Part>
+ <Part name="Corners">
+ Every corner is hard. Round them properly: a solid is the hull of two rounded rings, not a box with a radius pasted on.
+ </Part>
+ <Part name="Weight">
+ Every edge has the same weight, so nothing reads first. Make the silhouette bright, leave one dim crease inside, and stop drawing the vertical corners; the eye fills them in.
+ </Part>
+ <Part name="Words">
+ Take every word out of the figures. If a figure needs an identity, carry it in geometry. Names go in the corner read-out.
+ </Part>
+ <Part name="Write it down">Make these rules 09 and 10, so the next figure can&rsquo;t break them.</Part>
+ </Prompt>
+ <ol className="inspo-rules">
+ <li>
+ <span className="inspo-n">09</span>
+ <div>
+ <p className="inspo-rule">Round every corner, then draw less.</p>
+ <p className="inspo-p">
+ A solid is the hull of two rounded rings. Its vertical corners are never drawn, its top edge is one dim crease, and a thin plate gets a single thickness line. Bright outside, dim inside.
+ </p>
+ </div>
+ </li>
+ <li>
+ <span className="inspo-n">10</span>
+ <div>
+ <p className="inspo-rule">No words inside the figure.</p>
+ <p className="inspo-p">
+ Geometry carries identity: a punch on a card&rsquo;s tab, a dot code on a crate&rsquo;s lid. Names go to the read-out in the corner.
+ </p>
+ </div>
+ </li>
+ </ol>
+ <Shot src={craft} alt="The same six figures after the design pass, in a three by two grid: rounded solids with bright silhouettes, one dim crease on each top, and no words inside the drawings." caption="After the pass: rounded, quieter, and wordless." />
+ </Step>
+
+ <Step n={6} title="Into a package">
+ <p className="inspo-p">
+ The API was a design decision too. Six sliders became one <code className="doc-code">intensity</code>, because nobody using a figure should need to know what a falloff is. <code className="doc-code">theme</code> covers light and dark; <code className="doc-code">label</code> and <code className="doc-code">onRead</code> carry the read-out the words moved to. Then this site, and more arguing: Slow&rsquo;s gate was still being tuned after the figures shipped.
+ </p>
+ <a className="doc-more" href="/docs">Read the docs</a>
+ </Step>
+
+ <Step n={7} title="What I’d keep">
+ <ul className="inspo-keep">
+ <li>Write the brief like a spec: what it is, what to understand first, what&rsquo;s off limits, what shape the answer takes.</li>
+ <li>Ask for numbers and reasons, then argue with them. A first draft is something to push against.</li>
+ <li>Make the model build the instrument you judge with. Sliders beat descriptions.</li>
+ <li>Turn every correction into a rule, so it doesn&rsquo;t come back two figures later.</li>
+ <li>Taste is the part the model doesn&rsquo;t bring. Look hard, then say exactly what to change.</li>
+ </ul>
+ </Step>
+
+ <p className="inspo-prose doc-note">
+ The reference image belongs to Linear and appears here as a reference only. The figures and the code in Hairline are original.
+ </p>
+ </main>
+ <Footer />
+ </>
+ );
+}
diff --git a/apps/site/components/chrome.tsx b/apps/site/components/chrome.tsx
index b1d228f..87a0478 100644
--- a/apps/site/components/chrome.tsx
+++ b/apps/site/components/chrome.tsx
@@ -9,13 +9,14 @@ export function GitHub() {
);
}
-/** The bar on every page: the name home, the docs, the version, GitHub. */
+/** The bar on every page: the name home, the docs, the story, the version, GitHub. */
export function Topbar() {
return (
<header className="topbar">
<a href="/" className="text-[15px] font-medium tracking-[-0.02em]">hairline</a>
<nav className="flex items-center">
<a className="topbar-link" href="/docs">Docs</a>
+ <a className="topbar-link" href="/inspo">Inspo</a>
<span className="topbar-link tabular-nums" data-version>v{pkg.version}</span>
<a className="topbar-link" href={LINKS.github} aria-label="GitHub"><GitHub /></a>
</nav>
diff --git a/apps/site/public/inspo/craft.webp b/apps/site/public/inspo/craft.webp
new file mode 100644
index 0000000..ea0789e
Binary files /dev/null and b/apps/site/public/inspo/craft.webp differ
diff --git a/apps/site/public/inspo/dissection.webp b/apps/site/public/inspo/dissection.webp
new file mode 100644
index 0000000..33a96d4
Binary files /dev/null and b/apps/site/public/inspo/dissection.webp differ
diff --git a/apps/site/public/inspo/figures.webp b/apps/site/public/inspo/figures.webp
new file mode 100644
index 0000000..8a410b0
Binary files /dev/null and b/apps/site/public/inspo/figures.webp differ
diff --git a/apps/site/public/inspo/linear.webp b/apps/site/public/inspo/linear.webp
new file mode 100644
index 0000000..6ad0e6a
Binary files /dev/null and b/apps/site/public/inspo/linear.webp differ
diff --git a/apps/site/public/inspo/tune.webp b/apps/site/public/inspo/tune.webp
new file mode 100644
index 0000000..8e55ab4
Binary files /dev/null and b/apps/site/public/inspo/tune.webp differ
diff --git a/apps/site/test/site.spec.ts b/apps/site/test/site.spec.ts
index 22a2c80..193b5cd 100644
--- a/apps/site/test/site.spec.ts
+++ b/apps/site/test/site.spec.ts
@@ -39,9 +39,9 @@ test("the home prerenders an empty box, then draws the inspector's figure with a
expect(noise).toEqual([]);
});
-test("the top bar holds the docs, the version and GitHub, and no llms.txt button", async ({ page }) => {
+test("the top bar holds the docs, the story, the version and GitHub, and no llms.txt button", async ({ page }) => {
await page.goto("/");
- await expect(page.locator(".topbar nav > *")).toHaveCount(3);
+ await expect(page.locator(".topbar nav > *")).toHaveCount(4);
await expect(page.locator(".topbar")).not.toContainText("llms.txt");
});
@@ -56,7 +56,7 @@ test("the top bar's links sit as one row: one height, one centre line, one type,
const style = getComputedStyle(el);
return { height: box.height, middle: box.top + box.height / 2, left: ink.left, right: ink.right, type: [style.fontSize, style.fontWeight, style.color, style.backgroundColor].join(" ") };
}));
- expect(items).toHaveLength(3);
+ expect(items).toHaveLength(4);
expect(new Set(items.map((i) => i.height)).size).toBe(1);
for (const i of items) expect(Math.abs(i.middle - items[0].middle)).toBeLessThan(0.5);
expect(new Set(items.map((i) => i.type)).size).toBe(1);
@@ -729,3 +729,46 @@ test("a click in the sidebar still scrolls smoothly to its section", async ({ pa
expect(await page.evaluate(() => scrollY)).toBeLessThan(final - 100);
await expect.poll(() => page.evaluate(() => scrollY)).toBeGreaterThan(final - 2);
});
+
+test("the top bar's Inspo link opens the story of how Hairline was made, with a clean console", async ({ page }) => {
+ const noise = watch(page);
+ await page.goto("/");
+ await page.getByRole("banner").getByRole("link", { name: "Inspo" }).click();
+ await expect(page).toHaveURL(/\/inspo$/);
+ await expect(page.getByRole("heading", { level: 1 })).toHaveText("How Hairline was made");
+ await expect(page.locator("[data-step]")).toHaveCount(7);
+ // the story is the arguing: each pushback names what it changed
+ await expect(page.locator("[data-pushback] > li")).toHaveCount(5);
+ for (const item of await page.locator("[data-pushback] > li").all()) await expect(item.locator("[data-changed]")).not.toBeEmpty();
+ expect(noise).toEqual([]);
+});
+
+test("every picture on /inspo loads and says what it shows", async ({ page }) => {
+ await page.goto("/inspo");
+ const images = page.locator("main img");
+ await expect(images).toHaveCount(5);
+ for (const img of await images.all()) {
+ await img.scrollIntoViewIfNeeded();
+ expect((await img.getAttribute("alt"))?.length).toBeGreaterThan(20);
+ await expect.poll(() => img.evaluate((el: HTMLImageElement) => el.complete && el.naturalWidth)).toBeGreaterThan(0);
+ }
+});
+
+test("/inspo fits a phone down to 320px", async ({ page }) => {
+ for (const width of [320, 390]) {
+ await page.setViewportSize({ width, height: 800 });
+ await page.goto("/inspo");
+ await expect(page.getByRole("heading", { level: 1 })).toBeVisible();
+ expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(width);
+ }
+});
+
+test("every small label on /inspo is set the same: one face, size, weight and colour", async ({ page }) => {
+ await page.goto("/inspo");
+ const types = await page.locator(".inspo-label").evaluateAll((els) => els.map((el) => {
+ const s = getComputedStyle(el);
+ return [s.fontFamily, s.fontSize, s.fontWeight, s.letterSpacing, s.color].join(" ");
+ }));
+ expect(types.length).toBeGreaterThan(10);
+ expect(new Set(types).size).toBe(1);
+});