AI Prompt Engineering Framework for Web Design
Six parts every web design prompt needs: brand anchor, one signature mechanic, exact visuals, timing, structure and output contract. Real examples for each.
A web design prompt works when it specifies six things: who the brand is, the one interaction the hero is built around, exact visual values, motion timing, the structure and responsive behaviour, and the output contract. Leave any of them out and the model fills the gap with its most common default. Each part below shows the generic version, the version we write, and where to see the full example in the library.
Part 1: anchor the brand
Generic: "A SaaS hero for a project management tool."
Anchored: "Build an enterprise security SaaS hero for Sentinel." The name tells the model which product it's selling. The data does the rest. The Sentinel prompt supplies six realistic threat messages as constants at the top of the component, such as "Credential stuffing: 847 failed logins on /v2/auth" with its region code. Once the model is working with concrete domain content, the copy and the visuals start to reflect the product.
Use the anchor to make the model's decisions for you. A security product wants clarity and technical detail, not ambient gradients and smiling stock photos. A name, a buyer and one concrete detail are enough.

Part 2: one signature mechanic
Generic: "Make it interactive. Add some animations."
Specific: "The signature mechanic is a split-screen product reveal." That sentence in the Apex spec sets the whole hero: a black-and-white product image, a lime divider that sweeps across it, and full colour behind the divider.
Our library uses the same rule everywhere. Flow's mechanic is a fixed phone frame whose screen changes. Sentinel's is a threat feed that adds a row every three seconds. Each prompt has one mechanic. A second animation has to justify its place against the first, because two competing motions make both look weaker.
Part 3: exact visual values
Generic: "Use a modern sans-serif. Pick a professional colour scheme."
Exact: the Apex spec defines its palette as Tailwind tokens:
#0A0A09#F2F0EC#C8FF00#5A5955It also names the typefaces and weights: Barlow Condensed at 400, 700 and 900 with the 900 italic, and Inter Tight at 300, 400 and 500. A model has no taste to fall back on. Hex values and weights leave nothing to interpret, so the result reads as considered rather than accidental.
Part 4: timing and motion in milliseconds
Generic: "Add a smooth animation when the hero appears."
Timed: "Copy fades up at 0 / 100 / 220 / 340 / 440ms; the reveal sweeps from 600ms to 1800ms; the counters start at 500ms and finish at 2000ms."
That one line gives the model a schedule to build from. Each element has a start time, and the sequence reads in order. The reveal's easing is written out as cubic-bezier(0.76, 0, 0.24, 1), so there's no bounce to guess at, and the counters use an exponential ease-out with a stated duration.
Every prompt also covers the case where motion is switched off. Apex's rule is short: "prefers-reduced-motion: skip the animation, c = 0 immediately." A visitor who has asked for less motion gets the finished layout, not a broken one.

Part 5: structure and responsive behaviour
Generic: "Build a clean, modern layout that works on mobile."
Structural: the Apex spec describes what happens below the md breakpoint: "the two panels stack. The image panel is on top at aspect-[4/3]; the copy sits below with px-6 py-12. The H1 falls to 60px." It also states that the hero's minimum height applies on desktop only, and that the navigation's centre links are hidden below md while the cart stays.
Accessibility belongs in this section too. The spec names the focus treatment for every link and button, and the screen-reader text for the stat blocks: aria-label="[value] [label]", for example "5.6oz Ultralight". Writing these down means the model can't leave them out.
Part 6: the output contract
Generic: "Build a hero section."
Contract: the Apex spec ends with a file list (index.html, src/index.css, tailwind.config.js, src/components/Hero.tsx, src/components/SplitReveal.tsx, src/hooks/useCountUp.ts and src/utils/bezier.ts) and a stack line. That tells the model what done looks like, so you can review the output against it.
Name the stack, the files and the dependencies allowed. "lucide-react" is named in the stack line, so the model knows which icon library to use and doesn't add a second one.
Before and after
Vague: "Build a SaaS hero. Make it modern and clean with a nice colour scheme and some animation. Make sure it looks good on mobile."
Specified: "Build an enterprise security SaaS hero for Sentinel. One mechanic: a threat feed that adds a row every 3 seconds. Background #040B14, text #E8EDF3, accent #0EA5E9. Inter for the interface, JetBrains Mono for data. Reduced motion: no interval, rings and counters show final values immediately. Output: React 18 with TypeScript and Tailwind CSS 3, one component tree, no extra dependencies."
The second version is longer, and every added line removes a choice the model would have made for you. The first version gives you a page you can't tell apart from any other. The second gives you a hero you can review line by line.
A checklist for your next prompt
If you can't fill a line, that's the decision to make before you prompt, not after.
Where the framework stops
The framework makes a prompt specific. It doesn't make the idea good. If the mechanic doesn't say anything about the product, a precise spec will build it precisely and it still won't work. Review the output against the brief, not only against the spec.
It also doesn't replace testing. The same six parts describe Aura's breathing stage as well as Apex's product reveal, so the structure transfers even when the mechanic doesn't. Run the code at 375px, turn on reduced motion and check that the timing matches the schedule you wrote. The spec tells you what to check.
For the Claude-specific version of this advice, read how to write Claude prompts for web design. For a worked comparison of three prompt levels on one brief, see the same hero section built three ways. To browse the library by category, go to SaaS prompts.
FAQ
Do I need all six parts for every prompt?
For a hero, yes. A prompt that skips one part leaves that decision to the model. For a small component, such as a pricing toggle or a contact form, you can drop the signature mechanic and keep the other five.
What is the most common gap in web design prompts?
Timing. Prompts often name the effect but not its duration or easing, so the model picks a default. Writing the schedule in milliseconds closes that gap quickly.
Should the prompt include the colour names as well as hex values?
Include the hex values, and add the name only if it helps the reader. The hex value is the one the model should use. Names are for people reading the spec.
Does this framework work outside hero sections?
Yes. The six parts apply to any component: a features grid, a pricing section or a contact form. The signature mechanic may be smaller or absent, but the anchor, visual values, timing, structure and output contract still apply. See the pricing section prompt for a smaller component built this way.
Build a starter hero prompt in four questions with the free generator, or copy five prompts from the library with no account.
Get the next guide by email
New hero prompts and practical AI design guides like this one, when they go live. No spam, unsubscribe any time.
By signing up you agree to receive these emails. See our privacy policy.
Prompts from this article
Apex Athletic — Sportswear E-Commerce Hero
A split-screen sportswear hero where a lime divider sweeps across a black-and-white product image to reveal full colour, while performance stats count up beside it. Built for athletic apparel, performance gear and DTC sports brands.
Sentinel — Enterprise Security SaaS Hero
A dark enterprise hero whose live security-operations dashboard prepends a new blocked threat every three seconds while SOC 2, ISO 27001 and HIPAA rings sweep to their scores. Built for cybersecurity, compliance and B2B platforms selling to IT and security buyers.
Flow — Mobile App Launch Hero
Mobile app launch hero with a fixed phone frame that cycles through Home, Tasks, Habits and Insights screens, driving the headline, tabs and a coloured glow. Built for productivity and consumer iOS and Android apps.
The prompts in the HeroPrompts library are engineered at the level of detail described above — every font, colour, interaction, and animation specified. Skip the iteration and ship a hero section that looks like it cost money.
Claude Prompts for Web Design: How to Write Them
Claude prompts for web design that produce a site you would ship, not a generic template. The structure, with examples you can copy.
GuidesThe Complete Guide to AI Prompts for Web Designers in 2026
Everything a working web designer needs to know about AI prompts — how to write them, where to find good ones, how the major tools differ, and what the quality ceiling looks like.
GuidesClaude Code Prompts for Website Design, Section by Section
How to drive Claude Code in a real repo to build a website section by section: CLAUDE.md setup, spec-file prompts, scoped iteration and a browser check.
