DESIGN.md: the file your AI reads before it designs.
A DESIGN.md is a Markdown file that describes how your site should look: its colors, fonts, spacing, components and the rules that hold them together. Put it in your project and Claude Code, Codex or Cursor build every page in one consistent style, instead of inventing a new look each time.
Why your AI needs one
Ask an AI coding tool for a landing page and it guesses. It picks a font, a purple gradient and rounded cards, and the next page it builds looks slightly different.
A DESIGN.md takes the guessing away. Your AI reads the exact colors, the type scale and the components to use, and the things never to do, so page two matches page one.
DESIGN.md, CLAUDE.md and AGENTS.md
CLAUDE.md and AGENTS.md tell your AI how to work in your project: commands, conventions and rules.
DESIGN.md only covers how things look. Keeping it separate keeps both files short, and you can swap the style without touching your project's rules.
What goes in a DESIGN.md
The kits in the Design Gallery all follow the same outline. Use it for your own.
- The feel
- A paragraph on what the style looks and feels like, what it suits and what it doesn't.
- Fonts
- Each font's role (display, body, mono), its exact name, weights and where it comes from.
- Color
- Every color as a hex value and a CSS variable, with what it's for: background, text, accent, borders.
- Type scale
- The sizes, line heights and letter spacing for headings, body text and small print.
- Shape and space
- Corner radii, shadows, borders, the spacing steps and the page width.
- Components
- The classes for buttons, cards, navigation and forms, and when to use each one.
- Page recipes
- How a landing page, a pricing page, an article and a sign-up form are put together, section by section.
- Don'ts
- The mistakes that break the style, like a second accent color or centered body text. This list does more work than you'd think.
How to use it with Claude Code or Codex
- Put DESIGN.md and tokens.css in your project, next to README.md.
- Add a line to CLAUDE.md (Claude Code) or AGENTS.md (Codex) so your AI reads it every time.
- Ask for one page at a time, and describe what it's for and the sections you need.
- When something looks off, quote the rule: "the buttons should be square, see DESIGN.md".
The line to add to CLAUDE.md or AGENTS.md
Copy this so your AI follows the style without being reminded.
Before writing any UI, read DESIGN.md and follow it exactly. Use the variables in tokens.css and the classes in components.css. Don't add new colors, fonts, radii or shadows.
An example: Half Lit's DESIGN.md
The opening of a real kit from the gallery. See the Half Lit style or download its DESIGN.md.
Quiet, exact and expensive. The page is pure black and there is one typeface, a clean grotesk at regular and light weights. Every headline says two things in two tones: the first clause in white, the second in soft grey, so the eye lands on the name and then reads the promise. Buttons are white pills with a small chevron, panels are near-square dark tiles that sit side by side like product shots, and lists are plain white lines under a grey label. There is almost no colour: one warm thread tone appears only in tiny drawn details, list dots and focus rings. It feels confident and unhurried, like a shop with very few things in it.
Use it for: premium services, fashion and tailoring, billing and finance tools, hardware launches, studios, anything that should feel considered and calm. Avoid it for: kids, food delivery, community sites, playful consumer apps, anything that needs warmth or loud colour.
Read the rest of the file
How to use this file
Give this file, tokens.css and components.css to your AI coding tool and say:
Build [your page] in the Half Lit style. Follow DESIGN.md exactly. Use the tokens in tokens.css and the classes in components.css; don't invent new colors, fonts, radii or shadows.
demo.html (a landing page), pricing.html, blog.html and signup.html are complete example pages built only with the kit, for an invented made-to-measure tailoring service called Selvedge.
Fonts
All free on Google Fonts:
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500&family=Geist+Mono:wght@400&display=swap" rel="stylesheet">
| Role | Font | Use |
|---|---|---|
| Headlines | Geist 400 | Display, h1, h2 and quotes. Tight tracking (-0.035em), never bold. |
| Numbers | Geist 300 | Prices and stats, very tight (-0.045em). Light weight makes big numbers feel quiet. |
| Body and buttons | Geist 400 to 500 | Body at 400, h3 and buttons at 500. |
| Captions | Geist Mono 400 | Panel captions and step numbers at 11 to 12px, uppercase, in the dim grey. Use sparingly. |
Color
| Token | Hex | Role |
|---|---|---|
--hl-black |
#080808 | The page |
--hl-panel |
#101011 | Plans, form cards, inputs, app windows |
--hl-raise |
#18181A | Dark buttons, selected options, drawn objects |
--hl-line |
#222224 | Every hairline and rule |
--hl-line-bright |
#343437 | Input borders, featured plan border, feature top rules |
--hl-white |
#F4F4F2 | Main text and the primary button |
--hl-grey |
#8E8E92 | The quiet half of every headline, leads, labels |
--hl-dim |
#5C5C61 | Captions, meta, notes |
--hl-thread |
#C9A47C | The one accent: list dots, stitch lines, focus rings, one badge |
--hl-ok |
#A9D8B8 | "Yes" badges in tables |
Light effects: --hl-sheen (the dark diagonal fill of every panel) and --hl-spot (a soft white spot at the panel's top left).
Rules:
- The page is black, white and grey. If you add colour, it is --hl-thread and it is smaller than a word.
- The main action is always the white pill. The second action is the dark pill. Never colour a button.
- No gradients on text, no glows, no blur.
Type scale
| Token | Size | Use |
|---|---|---|
--hl-text-display |
clamp(40px, 6.2vw, 84px) | Landing hero, two lines |
--hl-text-h1 |
clamp(36px, 4.6vw, 60px) | Page titles, CTA titles |
--hl-text-h2 |
clamp(28px, 3.2vw, 42px) | Section headings and the aside next to panels |
--hl-text-h3 |
19px | Plan names, feature titles, card titles |
--hl-text-lead |
18px | Grey lead, max 520px |
--hl-text-body |
16px | Body |
--hl-text-micro |
12px | Mono captions |
The two-tone headline is the whole style. Write it as <h1 class="hl-h1">Name or claim<span class="hl-break hl-quiet">The plain promise</span></h1>. Use .hl-break to put the grey half on its own line (heroes, page titles) or leave it out so the grey half runs on after a full stop (section headings). Sentence case, no exclamation marks.
Shape and space
- Radius: 4px for panels and plans (almost square), 10px for inputs and option tiles, 999px for buttons, badges and the toggle.
- Borders: 1px
--hl-line. Features get a brighter top rule; plans and form cards a full hairline. - Shadows: only
--hl-shadow-panel, a deep soft drop under panels and the featured plan. - Panels:
.hl-paneltiles in a.hl-stagerow, two panels plus a text aside. Fill them with a tilted.hl-window, or with drawn objects (cloth swatches, a tape) made of CSS shapes in--hl-raisewith--hl-line-brightedges. - Sections: 72 to 140px vertical padding. Container 1280px with generous side padding up to 80px; articles 660px.
- Motion:
.hl-risefades content up 14px, staggered with--2and--3. Hovers only change grey levels and nudge the chevron.
Components (in components.css)
| Class | What it is |
|---|---|
.hl |
Put on <body>: black page, Geist, white text, clipped overflow |
.hl-container, .hl-narrow, .hl-section, --flush, .hl-rule |
Layout |
.hl-display, .hl-h1, .hl-h2, .hl-h3, .hl-quiet, .hl-break |
The two-tone headline |
.hl-lead, .hl-muted, .hl-label, .hl-mono |
Text helpers |
.hl-btn, --dark, --text, --sm, --block |
White pill, dark pill, plain text button |
.hl-nav, .hl-nav__inner, .hl-wordmark, .hl-nav__links, .hl-nav__end |
Top bar: wordmark left, grey links centre, sign in and a small white pill right |
.hl-hero, .hl-hero__body, .hl-actions |
Left-aligned hero |
.hl-stage, .hl-stage__aside |
Two panels and a text column in one row |
.hl-panel, --tall, --wide, .hl-panel__caption |
Dark product-shot tiles |
.hl-window, .hl-window__title, .hl-window__row |
A tilted app window inside a panel |
.hl-list, --lined |
Grey label plus white lines, or ruled rows with thread dots |
.hl-features, .hl-feature, .hl-feature__num |
Numbered features under a top rule |
.hl-split |
Heading left, content right |
.hl-stats, .hl-stat, __value, __label |
Light-weight big numbers |
.hl-badge, --thread, --ok, --white |
Pill badges |
.hl-quote |
A two-tone pull quote |
.hl-form, .hl-field, .hl-input, .hl-select, .hl-row, .hl-check, .hl-segment, .hl-note |
Forms |
.hl-toggle, .hl-plans, .hl-plan, --featured, .hl-price, .hl-table, .hl-faq |
Pricing |
.hl-article__meta, .hl-prose, .hl-figure, .hl-author, .hl-avatar |
Articles |
.hl-cards, .hl-card |
Panel cards with a title and a grey line |
.hl-cta, .hl-footer |
Closing band and footer |
.hl-rise |
Entry animation |
Pages in this kit
demo.html: nav, two-tone hero with two pills, a stage of two panels and a feature list aside, three numbered steps, a wide panel with stats, a two-tone quote, CTA band and footer.pricing.html: two-tone title with a billing toggle, three plans (the middle one featured), a comparison table and an FAQ.blog.html: a badge, two-tone title, author row, a wide drawn figure, prose with a list and a quote, and three related cards.signup.html: two-tone title with a lined list and a panel on the left, a form card on the right.
Page recipe
<body class="hl">, the nav, then a.hl-herowith a two-tone.hl-displayand two pills (white first).- Straight under the hero, a
.hl-stage: two.hl-panel--talltiles and an aside with a two-tone.hl-h2and a labelled.hl-list. - Then alternate: a
.hl-splitwith numbered.hl-features, a wide panel with.hl-stats, a.hl-quote. - Close with a
.hl-cta(two-tone.hl-h1left, pills right) and the footer.
Pricing: two-tone .hl-h1 with a .hl-toggle on the right, .hl-plans with the middle plan --featured and a white pill, the others dark pills, then .hl-table and .hl-faq in a .hl-split.
Article: .hl-narrow head with a .hl-badge--thread, a two-tone .hl-h1 and .hl-author; a full-width .hl-figure panel; .hl-prose in .hl-narrow; related .hl-cards at the end.
Sign up: .hl-h1 and a .hl-list--lined on the left, a --hl-panel form card on the right, one white .hl-btn--block to submit.
Don'ts
- Don't make headlines bold or one colour. Two tones, regular weight.
- Don't round the panels. They are 4px, like photographs.
- Don't use the thread colour for fills, buttons or large areas.
- Don't add a second typeface or a serif.
- Don't add glows, blurs or gradient text. Light comes only from the panel sheen.
- Don't centre everything. Heroes and titles sit on the left edge.
Tips for writing your own
- Be exact. "#1f6feb" beats "a nice blue", and "Inter 600 at 48px" beats "a bold heading".
- Say why. "One accent color, so the button is the only thing that pops" helps your AI judge cases you didn't cover.
- Keep the values in tokens.css and the reasons in DESIGN.md, so a color only changes in one place.
- Write the don'ts. AI tools love gradients, emoji and extra shadows: say so if your style has none.
- Start from a kit. Every style in the gallery is free to download and change.
Questions
What is a DESIGN.md file?
A Markdown file that describes a design in words and values: its colors, fonts, spacing, components, page layouts and the things to avoid. It sits in your project so an AI coding tool can read it before it writes any code.
Where do I put DESIGN.md?
In the root of your project, next to README.md, or in a docs folder. Then tell your AI to read it first, or mention it in CLAUDE.md or AGENTS.md so your tool reads it every time.
Is DESIGN.md the same as CLAUDE.md or AGENTS.md?
No. CLAUDE.md and AGENTS.md tell an AI how to work in your project: commands, conventions and rules. DESIGN.md only covers how things should look. Keeping it separate keeps both short and easy to update.
Does DESIGN.md work with Cursor, Copilot or Windsurf?
Yes. It is plain Markdown, so any AI coding tool that can read files in your project can follow it. Point the tool at the file in your prompt.
Do I still need a CSS file?
Yes. DESIGN.md explains the rules, and a tokens file (tokens.css) holds the exact values as CSS variables. Your AI uses both: the words for judgment, the variables so every color and size stays the same.
Can I write my own DESIGN.md?
Yes. Start from one of the free kits in the Design Gallery and change it, or write the sections below from scratch. Be specific: exact hex values, font names and weights, and what never to do.