The Clay design guide
How to build a static website that looks designed. This is what the Clay MCP hands an AI through get_design_guide before it writes a page, and it is published as a page at clay.site/design-guide. Plain HTML, CSS and JS, no build step, no framework, mobile first.
The rules that always hold
- Real content, never filler. No lorem ipsum, no "Your tagline here", no invented reviews, prices, awards, team members or numbers. If you do not know a fact, ask the user or leave the section out. A short true page beats a long made-up one.
- No emojis anywhere: not in headings, buttons, lists or the title.
- One accent colour. Take it from the logo or the user's brand. Otherwise pick one that fits the trade. Use it for buttons, links and one or two highlights only. Everything else is ink, paper and greys.
- Mobile first. Write the phone layout first; widen with
min-widthmedia queries. Test the page at 375px wide: nothing scrolls sideways, no text under 16px for body copy, tap targets at least 44px tall. - One clear action per page. Book, call, order, get in touch. It sits in the first screen and again at the end.
- Plain punctuation. No em dashes in titles or descriptions; write like a person.
Type
- Two typefaces at most. A safe pair: one sans for everything (Inter, system-ui), or a display face for headings plus a sans for body. Load from Google Fonts with
display=swap, or use the system stack. - Scale (phone, then desk from 900px):
| role | phone | desk | weight | line height |
|---|---|---|---|---|
| display (hero h1) | 40px | 64px | 700 | 1.05 |
| h2 (section) | 28px | 40px | 650 | 1.15 |
| h3 (card) | 20px | 22px | 600 | 1.25 |
| body | 17px | 18px | 400 | 1.6 |
| small / meta | 14px | 14px | 500 | 1.4 |
- Use
clamp()if you prefer one rule:font-size: clamp(40px, 6vw, 64px). - Line length 45 to 75 characters:
max-width: 65chon text blocks. - Headings get
letter-spacing: -0.02emat display sizes; body text none. - One heading per section. Do not stack an eyebrow, a heading, a subheading and a lead paragraph.
Spacing
- One scale, in pixels: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128. Use nothing in between.
- Page gutter: 20px on a phone, 32px on a tablet, content max width 1120px centred.
- Section padding: 64px top and bottom on a phone, 96 to 128px on a desk.
- Inside a card: 20 to 24px. Gap between cards: 16px on a phone, 24px on a desk.
- More space between sections than inside them. That is what makes a page read as sections.
Colour
Define tokens once on :root and use only those:
:root {
--paper: #ffffff; --ink: #111111; --muted: #5c5c5c;
--line: #e6e6e6; --soft: #f5f5f4; --accent: #0885fe; --on-accent: #ffffff;
}
- Text on the accent must pass 4.5:1 contrast (check it). If white fails, use ink on the accent.
- A dark site is the same five tokens inverted, not a second design.
- Alternate
--paperand--softbetween sections to separate them without borders.
Images
- Use the user's own photographs. Upload them with
upload_imageand use the path it returns. - Never hotlink images from other sites, and never use a photo of a different business as if it were theirs.
- Every
<img>hasalttext that says what is in the picture,widthandheightattributes (stops the page jumping), andloading="lazy"except the first one on the page. - Crop with CSS:
aspect-ratio: 4 / 3; object-fit: cover; width: 100%. Keep one or two ratios per site (for example 16:9 for wide, 4:5 for portraits). - Rounded corners: one radius for the whole site (8 to 16px), or none.
- No text baked into images. Put words in HTML.
Section patterns that always work
Pick the ones that fit; most sites need four to six.
- Hero. Name or promise as the h1, one line under it, the main action as a button. A photo beside it on a desk, above or below it on a phone.
- What we do. Three to six cards in a grid (one column on a phone, two or three on a desk): a short heading and one or two sentences each.
- Proof. Real reviews with the reviewer's first name, or logos of real clients. Never made up.
- Gallery. Six to twelve photographs in an even grid, same ratio.
- About. One photograph and a short paragraph in the owner's voice.
- Practical. Address with a map link, opening hours as a simple table, phone as a
tel:link, email as amailto:link. - Contact form. See below.
- Closing action. The main action again, full width, big button, nothing else in the band.
- Footer. Name, address, the main links, small print. Small and quiet.
Buttons and links
- One primary button style (accent fill, 12 to 16px vertical padding, the site's radius), one secondary (outline or plain text link). No third.
- Button text is a verb: "Book a table", "Call us", "Send".
- Visible focus states:
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }.
A form that works on Clay
A form posts to Clay and the owner gets each submission by email and in their account:
<form action="/api/forms/SITE_ID" method="post">
<label>Name <input name="name" required autocomplete="name"></label>
<label>Email <input name="email" type="email" required autocomplete="email"></label>
<label>Message <textarea name="message" rows="5" required></textarea></label>
<input name="_gotcha" tabindex="-1" autocomplete="off" style="position:absolute;left:-9999px" aria-hidden="true">
<button type="submit">Send</button>
</form>
- Replace
SITE_IDwith the site's id fromget_site. - Inputs are 16px or larger (iOS zooms the page under that), full width on a phone, with a visible label above each.
- Never ask for passwords, card numbers or ID numbers in a form.
Pages, files and the head
index.htmlis the home page. Other pages areabout.htmlorabout/index.html; link to them with relative paths.- One shared
styles.css, one optionalscript.js. No build step, no npm packages. - Every page has, in
<head>:
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Name, what it is, where (30 to 60 characters)</title>
<meta name="description" content="One or two plain sentences, 120 to 160 characters.">
<link rel="icon" href="/favicon.svg">
<meta property="og:title" content="..."><meta property="og:image" content="/images/share.jpg">
<html lang="...">in the site's language. Write every language natively, not word for word.- Use real HTML:
<header>,<main>,<section>,<footer>, one<h1>per page, headings in order.
Motion
- Little and calm: a 150 to 250ms ease on hover and focus. No parallax, no autoplaying carousels, no animated counters. Respect
prefers-reduced-motion.
Before you publish
- Open the preview on a phone width. Nothing scrolls sideways, nothing overlaps.
- Every link works, every image has alt text, the form sends.
- Title and description are filled in on every page.
- Ask the user, then publish. Never publish without a yes.
Kind: business
For a café, shop, salon, restaurant, studio or trade. Order: hero with the main action (book, call, order, directions), what we do, proof, gallery, practical (hours, address, map link), closing action. Put the phone number and opening hours where a visitor finds them in five seconds. Offer to start from their Google Maps listing.
Kind: portfolio
For a photographer, designer, maker or freelancer. Order: hero with name and one line on what they do, selected work as a large-image grid (each piece a title and a line, optionally its own page), about, clients or kind words, contact. The work is the design: keep everything around it quiet.
Kind: product
A one-page product or app. Order: hero with the promise and the action (buy, sign up, download), the problem in three short lines, how it works in three steps, features as cards, price, questions, closing action. One screenshot or photo per idea.
Kind: event
Order: hero with the name, date, time and place in the first screen, the action (tickets, RSVP), programme as a simple timeline, speakers or performers if real, location with a map link, questions. Write the date in full ("Saturday 14 March 2027, 19:30").
Kind: links
A link page. One column, max width 480px, centred. Name, photo, one line, then the links as full-width buttons (48px tall at least), then social icons as plain SVG. Nothing else.
Kind: coming-soon
One screen. Name, one sentence about what is coming, an email sign-up form (posts to /api/forms/SITE_ID), and one way to reach them. No countdown unless there is a real date.