Hanken Grotesk
Built to be used.
Headlines, paragraphs, navigation, form labels, and most metadata. Display type is heavy and tightly tracked; reading text has a more relaxed rhythm.
Style guide The portfolio’s working design system
The colors, type, components, and interactions used across this portfolio. Live examples, usage notes, and links to the pages where they do the work.
Cool paper, charcoal, and denim. The palette stays in tune with the photograph on the home and about pages.
The navy suit and throw, dark shelves, and daylight give the site its color direction. Strong typography provides the emphasis; blue connects the actions, feature sections, and editorial details.
Use paper for reading, denim tint to group related content, and ink or denim for a deliberate change of pace.
See the portrait in context#FAFBFC
--paperDefault page surface.
#FFFFFF
--raisedInputs and selected content panels.
#1A1B1E
--inkPrimary text, the footer, and dark feature surfaces.
#565760
--ink-mutedDescriptions, captions, and supporting text.
#244C71
--portfolio-bluePrimary actions, editorial italics, and feature bands.
#EDF1F4
--portfolio-tintTool workspaces, related content, and quiet emphasis.
#2E5C8A
--accentSurface-aware icons, links, and focus indicators.
#E5E7EB
--lineQuiet dividers; not a sufficient input boundary on its own.
#D4D7DD
--line-strongStronger rules and panel outlines.
#9A9AA1
--ink-faintDecoration only. Use muted ink for readable text.
Primary text stays dark. Descriptions use muted ink; readable text never uses faint ink.
Browse writingFeature bands use white text and lighter blue supporting text. Keep links underlined or otherwise explicit.
Read recommendationsThe footer, project navigation, and code artifacts use light text on ink. Links, icons, and focus styles need enough contrast against the dark surface.
Get in touchSwatch values are read from the site’s CSS at build time. Decorative borders and colors are separate from the contrast required for text, focus indicators, and controls.
Four typefaces, with distinct jobs. Bold headings carry the message; italics add a little character.
Hanken Grotesk
Built to be used.
Headlines, paragraphs, navigation, form labels, and most metadata. Display type is heavy and tightly tracked; reading text has a more relaxed rhythm.
Newsreader
A little character.
Editorial italics within large headings and occasional pull quotes. It adds contrast without taking over the reading experience.
Geist Mono
const shared = true;
Code and selected technical metadata. It identifies technical detail rather than serving as a label on every section.
Style Script
The wordmark in the header and footer. Keep it out of body copy, buttons, and interface labels.
Use the shared page-type and section-type classes for the main editorial hierarchy. Semantic heading levels still follow the document outline.
Shared UI. Clear intent.
Accessible components and product interfaces, built for the teams using them.
Section heading.
<h1 class="page-type">How this site <em>is designed.</em></h1>
<p class="page-lede">A short introduction with a clear purpose.</p>
<h2 class="section-type">Section <em>heading.</em></h2> Heading and Text remain in use for case studies and supporting pages. Visual size is independent of the heading’s semantic level.
Explain the situation, the alternatives, and the reason for a decision. Keep the reading column comfortable rather than stretching every paragraph across the page.
Captions describe what the reader is seeing and why it matters.
Use a filled denim action for the next important step, and an underlined editorial link for the supporting route.
The same styles appear on the home page, résumé, articles, and tools. Arrow glyphs are decorative; the visible words name the destination.
<a class="action-link" href="/projects/">
Explore my work <span aria-hidden="true" data-link-arrow="down-right">↘</span>
</a>
<a class="editorial-link" href="/resume/">
View résumé <span aria-hidden="true" data-link-arrow="up-right">↗</span>
</a> Use the light editorial-link variant on dark surfaces. The underline remains visible before hover.
The Link component still supplies site navigation and inline legal-page links. Decorative icons stay out of the accessible name; standalone controls need a label.
Try hovering and tabbing through the examples. Hover changes the fill, underline, or border. Keyboard focus adds a visible outline. The primary action is at least 52px tall; editorial links provide a 44px minimum target.
Visible labels, useful hints, specific errors, and feedback while sending. The contact page uses these same components.
Try the validation and sending state. This demonstration stays in your browser and does not send a message.
<Field label="Email" name="email" required hint="Only used to reply.">
<Input name="email" type="email" required
describedBy="field-email-hint" />
</Field>
<SubmitButton label="Send message" loadingLabel="Sending…" /> The busy state changes the label, shows a spinner, and prevents repeat submission. A disabled action keeps its label and uses reduced opacity.
Match label and input IDs. Connect the hint and error with describedBy, and apply aria-invalid when a field needs attention.
Enter a complete email address.
Case studies make ownership and evidence clear. Articles support long reading. Recommendations keep the words and their author together.
ProjectHero establishes context and ownership. Tldr expands the decision record. WorkList and ProjectNext connect related work; CaseReview provides page shortcuts.
fewer support calls
fewer shipping errors
Reported outcomes from the IVFCRYO case study. Keep a metric’s source, scope, and explanation close to the number.
Interviews with the owner, the COO, and the office manager showed the hard part wasn't the drive. It was getting five people, the patient, two clinics, a courier, and IVFCRYO, all confirmed and ready before a shipment could start.
Plate shows the full design sheet at its natural aspect ratio. Open the viewer to inspect details; Escape closes it and returns focus.
A real interface artifact from the IVFCRYO case study.
Use Recommendation for a named, attributed quote. The testimonials page also has a larger featured treatment on denim with a small Newsreader quotation mark.
Josh was always a great design and research partner… He always worked hard to ensure accessibility across our experience.
Drew DiPasquale
Principal Researcher
HubSpot
Articles use a focused reading measure, strong chapter headings, underlined links, and a section index. Tables keep their column headings and scroll horizontally when needed.
Component APIs, examples, and tests describe how shared UI behaves. A reader should be able to find the decision behind the interface.
Shared interfaces need shared contracts.
| Pattern | Purpose | Where it appears |
|---|---|---|
| Contents navigation | Jump between sections and track reading position | Blog articles |
| Expandable summary | Read the decision record without extending the opening summary | Project pages |
A small portrait, modest name, and short biography close each article. Keep the credit on the page surface and use muted text for supporting details.
Older and newer links close each article below the author credit. Keep it to a hairline, a small direction label, and the title; arrows point the way the reader travels: left for older, right for newer. Hover brings the title into the accent color.
Give each resource its own linked name and a short description when it helps readers choose. Simple link collections can use two columns on wider screens; phones keep a single reading column.
Josh Comeau · CSS fundamentals and layout for JavaScript developers.
Matt Pocock · TypeScript and the types behind application APIs.
Visual details need a content purpose. The résumé timeline connects employment dates; a small quotation mark identifies the featured recommendation. Keep project previews on plain stages, and reserve numbering for content where sequence matters.
SiteShot, ScrollShot, and LiveEmbed support personal-project and case-study media. FidelityBand compares design stages. CodeBlock uses the same GitHub Dark syntax highlighting as articles, with readable comment colors, line numbers, wrapped lines, and a copy action; open any “View markup” example here to try it.
Four explanatory illustrations, each tied to a working tool. Their controls and results share the portfolio’s type, surfaces, and action styles.
A structured snapshot of your system, with suggested priorities based on your answers.
An estimate of UI rework costs, with the assumptions available to inspect.
A live demonstration of shared design values updating several components together.
Example findings that connect an interface issue to its severity and a concrete fix.
The calculator and token playground use labelled sliders and numeric inputs. The Scorecard uses grouped choices with a visible selected state. Preserve the label, value, and keyboard behavior.
The calculator recalculates estimates from its inputs. The Scorecard preserves progress locally and opens a report. The audit tool pairs findings with fixes; it is a sample interface, not a scan of the reader’s website.
Shared widths and spacing keep pages coherent. Motion helps explain a state change or makes an available action easier to notice.
Container provides a 24px gutter on each side. Its width caps include those gutters. Editorial sections use 5.5rem vertical padding on larger screens and 3.75rem on phones.
narrow 48remcontent 64remdefault 72remwide 80remArticle text is capped at 48rem, with a separate contents rail on desktop and an expandable index on smaller screens. Project pages combine narrower reading columns with wider interface artifacts.
Headings use fluid sizes. Section shortcut navigation becomes a full-width list below 768px, with labels on the left and arrows on the right. Multi-column content stacks when its reading space gets too tight; data tables keep a horizontal scroller rather than dropping their headers.
Hero content rises 12px over 0.7 seconds with a small stagger. Sections reveal once as they enter the viewport. Content stays visible when reduced motion is requested.
Link arrows move 3px in their pointing direction over 200ms with the shared ease-out curve, on hover and keyboard focus. Reduced motion keeps arrows still. Article previews fade in a title underline and accent color on hover, with no enclosing hover border. Keyboard focus adds the enclosing border and outline. Other related-content links may also change their background or underline. A visible focus outline supports keyboard navigation. The thin page-top progress bar tracks scrolling where the browser supports scroll timelines.
Try the related-tool linksPrint uses one centered 70ch measure for body content and headings, with no narrower text limits inside it. Hanken headings with Newsreader emphasis, generous page margins and spacing, white surfaces, and a small identity and source line keep the document coherent. Whitespace separates sections; horizontal section rules are omitted. Screen navigation, share controls, and decorative effects are omitted. Headings stay with their content; tables repeat their column headings and code wraps to the page width.
Disclosures expand for print and return to their previous state afterward. Case-study artwork fits within a sheet, live demos use their poster images, and external links receive numbered references. Tools retain current answers, values, and results. The downloadable résumé keeps its separate document layout.
The skip link is the first keyboard stop. Mobile navigation uses a native modal dialog with bold primary links, supporting destinations, and a Contact me link. It contains keyboard focus, locks background scrolling, closes on an outside click or Escape, and returns focus to the menu button. Artifact dialogs also support Escape dismissal. The artifact viewer restores focus to its trigger. Code and article-share actions announce clipboard success or failure.
Alt/Option plus hover reveals source information on elements with data-source. The layout inspector is activated with ↑ ↑ ↓ ↓ ← → ← → B A; Escape dismisses it. These are optional inspection aids, separate from normal site navigation.
44 components reached by the site’s pages. Each entry links to a page that uses it; examples created only for this guide are excluded.
Shared CSS patterns such as action-link, page-type, and editorial-section are documented above. Run npm run audit:components to check production usage and this index.
Site navigation, contact information, and supporting links.
src/components/chrome/Footer.astroThe shared wordmark, primary navigation, and contact link.
src/components/chrome/Header.astroThe mobile navigation modal with outside-click and Escape dismissal, focus containment, and scroll locking.
src/components/chrome/MobileNav.astroThe first keyboard stop, taking readers directly to main content.
src/components/chrome/SkipLink.astroContent widths with a shared 24px horizontal gutter.
src/components/layout/Container.astroSurface and spacing wrapper used by case studies and supporting pages.
src/components/layout/Section.astroHeading semantics and visual size controlled independently.
src/components/primitives/Heading.astroIconify icons with decorative or explicitly labelled semantics.
src/components/primitives/Icon.astroNavigation, inline, and arrow links used by the site chrome and legal pages.
src/components/primitives/Link.astroThe Style Script wordmark used in the header and footer.
src/components/primitives/Logo.astroBody, caption, and supporting text used by case studies and supporting pages.
src/components/primitives/Text.astroA visible label with optional hint, required marker, and error text.
src/components/form/Field.astroPolite success status or assertive error feedback.
src/components/form/FormAlert.astroText, email, and phone inputs used by the contact form.
src/components/form/Input.astroPrimary action with ready, busy, and disabled states.
src/components/form/SubmitButton.astroMultiline input with explicit label and description references.
src/components/form/Textarea.astroCase-study shortcuts to the summary, interface, and outcomes.
src/components/patterns/CaseReview.astroA captioned code artifact with article-matched syntax highlighting, line numbers, and a copy action.
src/components/patterns/CodeBlock.astroA case-study comparison of design fidelity and implementation.
src/components/patterns/FidelityBand.astroThe shared artifact viewer, with zoom and keyboard dismissal.
src/components/patterns/Lightbox.astroAn optional, explicitly loaded live website preview.
src/components/patterns/LiveEmbed.astroA measured result with a label and supporting context.
src/components/patterns/Metric.astroA full design sheet with a caption and keyboard-accessible zoom.
src/components/patterns/Plate.astroThe responsive photograph used on the home and about pages.
src/components/patterns/Portrait.astroA project title, ownership details, evidence, and interface preview.
src/components/patterns/ProjectHero.astroA large link to the next project, using the shared project data.
src/components/patterns/ProjectNext.astroA quotation attributed to a named colleague; regular and featured layouts.
src/components/patterns/Recommendation.astroA scrollable long-page screenshot with an inspection control.
src/components/patterns/ScrollShot.astroA website screenshot with a caption and optional image viewer.
src/components/patterns/SiteShot.astroA project summary with expandable decisions, evidence, and reflection.
src/components/patterns/Tldr.astroAn explanatory SVG for each of the four tools.
src/components/patterns/ToolIllustration.astroAn explanatory SVG for each article, drawn in the same style as the tool illustrations.
src/components/patterns/ArticleIllustration.astroJosh's free online books, each with a typographic cover.
src/components/patterns/BookList.astroSelected case studies with interface images, roles, and results.
src/components/patterns/WorkList.astroClient-side validation, submission, and status handling for contact messages.
src/components/islands/ContactForm.astroA clipboard action with visible and announced feedback.
src/components/islands/CopyButton.astroAn interactive sample audit with review findings and proposed fixes.
src/components/islands/Diagnostic.astroA keyboard-activated layout overlay for inspecting the site.
src/components/islands/InspectorMode.astroA rework estimate that recalculates from the reader’s inputs.
src/components/islands/RoiCalculator.astroA design-system self-assessment with local progress and report output.
src/components/islands/ScorecardEngine.astroLive controls showing how shared tokens change several UI elements.
src/components/islands/TokenPlayground.astroAn optional Alt/Option-hover overlay for elements carrying source metadata.
src/components/islands/ViewSource.astroScannable article resources with clear links, optional descriptions, and responsive columns.
src/components/writing/ResourceList.astroA labelled, keyboard-scrollable table region that preserves column headings.
src/components/writing/ArticleTable.astroSource: https://joshuabriley.com/style-guide/