Skip to main content

Product Design

What design decision are you making right now?

This hub is the single source of every measurable design rule in this repo. Every threshold below appears here exactly once. Other pages teach the deeper pattern but reference this table for the numbers — they never restate them. Drift starts when a rule lives in three places; the fix is one place, many readers.

Owner. This hub is the public entry point in the design authority chain. The chain runs public schema (Standards) → public hub (this page) → operational bible (src/components/DESIGN.md) → runtime tokens (tailwind.config.js). Drift across the chain is owned by the drmg-design-curator agent (.claude/agents/drmg-design-curator.md). Invoke the curator after any edit to one of the four layers; it reports mismatches and proposes the fixes.

Design Memory — Where It Lives

Design knowledge lives in four layers. What we cannot share, are still working out, or is about planning lives inside. What we think is worth sharing lives outside, split by intent: /docs/ answers HOW, /meta/ answers WHY. The running code and agent config sit beside the components themselves.

LayerWhereWhat lives there
Inner.invisible/What we cannot share yet, work in progress, tactical planning — per-venture and per-workchart design memory
How/docs/ (this hub + standards)Public universal patterns, hard thresholds, schema — worth sharing
Why/meta/Public narrative — rhetoric and reflection on why these design decisions matter — worth sharing
Operationalsrc/components/DESIGN.md + tailwind.config.js + .claude/skills/design-*/Runtime memory the agents read while building

One file format across all four layers. The Google Labs design.md standard — YAML front matter (typed design tokens) + Markdown body (human rationale) — describes a design system to any AI agent in any tool. Schema, scope rules (system / per-venture / per-workchart / per-deck), and lint enforcement live in Design System Standards §The DESIGN.md Standard.

# Lint the operational bible before shipping
npx @google/design.md lint src/components/DESIGN.md

The Four-Pass Audit Sequence

The four-pass sequence (Rendering → Visual → Responsive → Interaction) is the canonical loop — see How to Audit a Page. Then pick the situation-specific deep dive from the router below.

Browser Canvas Storytelling

Some ideas should not stay as prose. When a page asks the reader to compare, sequence, diagnose, or hold several dimensions in working memory, climb the ladder from markdown to MDX/React and make the relationship visible.

Use this pass before component styling:

QuestionBrowser-canvas movePass condition
What is the reader trying to decide?Open with a single decision surface, not an abstract introA new reader can state the decision in 5 seconds
What relationship carries the meaning?Choose sequence, comparison, matrix, loop, or ledgerThe layout shape teaches the concept before the body copy
What can be collapsed into a reusable pattern?Use Section, Container, SectionHeader, Card, Rhythm, TightFive, DataListTable, StatThe page imports primitives before hand-rolling surfaces
What should the reader do next?End with a prompt, checklist, or routed link that continues the jobThe final viewport has one clear next action

Docs rule. /docs/ pages stay MDX. They may use JSX and design-system primitives, but they do not become .tsx pages. A visual block is justified when it reduces cognitive load, not when it merely decorates text.

Story arc for teaching pages:

Problem tension → Operating principle → Visual model → Application → Proof/loop → Next action

Use the arc flexibly. The important constraint is state change: the reader should leave with a sharper question, a simpler model, and a next move they can run.

Situation Router

You're doing thisUse this
Deployed but something looks wrongAudit Loop — Rendering layer
Making it look professionalDesign Language — tokens + composition
Testing on phones or checking speedResponsive + Performance
Ensuring everyone can use itInteraction + Accessibility
Building a page that needs to convertLanding Page Review
Building reusable UI componentsDesign Language — component hierarchy
Building admin/data management UIData Interfaces
Reviewing someone's workAudit Loop — Review section
Building or auditing a marketplaceMarketplace Design
Setting up Tailwind v4 theme tokens (greenfield app)Tailwind v4 Theme
Working in THIS Docusaurus repo (v3 fallback)src/css/CLAUDE.md
Composing components into a systemDesign Language — boundaries + composition
Using AI to build and review pagesAudit Loop
Looking for the brand identity, component inventory, landing page sequenceDesign System

Hard Thresholds — The Single Source

Every measurable design rule in this repo. The "deep dive" column says where to learn the why; the threshold here is the law.

#CheckThresholdDeep dive
1Contrast (body text)≥ 4.5:1a11y
2Contrast (large text — 18px+bold or 24px+)≥ 3:1a11y
3Contrast (UI elements + borders)≥ 3:1a11y
4Touch target44×44 px (WCAG 2.2 SC 2.5.8 absolute minimum: 24×24 px)a11y
5Focus ring contrast≥ 3:1 against adjacenta11y
6Body text minimum16px at every breakpointperf
7Mobile reflow320px viewport, zero horizontal scrollperf
8Line length45–75 charactersdesign-language
9H1 per pageExactly 1design-language
10Heading hierarchyNo skipped levels (H1 → H2 → H3)a11y
11Visual focal point1 element ≥ 1.5× larger per viewportaudit-loop
12File length (component)≤ 150 linesdesign-language
13Props per component≤ 7 (split if more)design-language
14Nesting depth≤ 3 levelsdesign-language
15Prop drilling depth≤ 2 levels (else context or composition)design-language
16Composition score> 80% library imports per pagedesign-language
17Tokens in componentsZero hex literals; reference var(--*) or Tailwind token utilitydesign-language
18Arbitrary Tailwind valuesForbidden (text-[#b91c1c], p-[7px]) — tokens existdesign-language
19Modal primary actions≤ 2data-interfaces
20Form fields — inline1–3data-interfaces
21Form fields — modal4–6 (> 6 = full page or wizard)data-interfaces
22Modal content heightFits viewport, no inner scrolldata-interfaces
23Table columns visible at once≤ 7data-interfaces
24Table row height40–56 pxdata-interfaces
25Row actions visible≤ 3 (overflow menu for more)data-interfaces
26Data list pagination — < 20 itemsShow alldata-interfaces
27Data list pagination — 20–100Paginate (10–25/page)data-interfaces
28Data list pagination — > 100Search requireddata-interfaces
29Data list pagination — > 1000Server-side filter + load-on-demanddata-interfaces
30Soft-delete undo window10 secondsdata-interfaces
31LCP (Largest Contentful Paint)< 2.5s good · 2.5–4.0s needs work · > 4.0s poorperf
32INP (Interaction to Next Paint)< 200ms good · 200–500ms needs work · > 500ms poorperf
33CLS (Cumulative Layout Shift)< 0.1 good · 0.1–0.25 needs work · > 0.25 poorperf
34First Contentful Paint< 1.5sperf
35Page weight total< 1 MBperf
36JS transferred< 300 KBperf
37CSS transferred< 100 KBperf
38Image budget — total< 500 KBperf
39Image budget — single image< 200 KBperf
40Fonts< 100 KB total, max 2–3 families, WOFF2, font-display: swapperf
41Breakpoints (no exceptions)375 / 768 / 1024 / 1440 pxperf
425-second test5 of 5 readers identify what/who/actionaudit-loop
43Confirmation feedbackVisible within 200ms of actionaudit-loop
44Hover transition100–200msa11y
45Animation duration (UI transitions)< 400msa11y
46Auto-playing animationNone except loading indicatorsa11y
47prefers-reduced-motionAll non-essential animation disabled when seta11y
48Color independenceStatus never by colour alone — icon + text requireda11y
49alt text on <img>100% coverage; decorative images carry alt="" + aria-hidden="true"a11y
50Form labelsEvery input has <label for> or aria-label/aria-labelledbya11y
51Keyboard reachability100% of interactive elements reachable via Taba11y
52Skip linkFirst Tab stop is "Skip to main content"a11y
53Landing page form fields (conversion)1–3 preferred; minimum-viablelanding-page
54Landing page conversion benchmark2–5% good · 5–10% greatlanding-page
55CTA colour uniquenessReserved for clickable elements only; zero non-clickable uselanding-page
56Teaching-page story arcProblem → principle → visual model → application → proof/loop → actiondesign-language
57Browser-canvas triggerUse MDX/JSX when comparison, sequence, loop, matrix, or ledger carries meaningdesign-language
58Visual block purposeEvery visual block must answer a named reader questiondesign-language
59Docs implementation format/docs/ visual pages remain .mdx; never .tsxdesign-language
60Next-action closeFinal viewport contains one prompt, checklist, or routed next linkaudit-loop

The Five-Question Audit (run on every page)

These five questions sit upstream of every checklist. If a page fails any of them, the checklists are decoration.

  1. Who is this for? A specific person — not "everyone."
  2. What do they need to know? One essential piece, not five.
  3. What do they need to do? One clear action, not a menu.
  4. Why should they trust us? Specific proof, not adjectives.
  5. What's stopping them? A real objection, named and answered.

If you cannot answer all five in plain prose before opening DevTools, no audit will save the page.

Tailwind: This Repo vs Greenfield Apps

The v3/v4 comparison and the principle behind both lives in Design Language — Tailwind mechanism per context.

Context