Hero section design: fix a generic AI hero, step by step
A full before and after. Take a typical generated hero and fix the headline, type, layout, image and call to action, with the Claude Code prompt for each step.

The short version
- Fix a generic hero in five small passes, in this order: copy, type, layout, visual and call to action.
- Write a headline under 8 words that says what the reader gets. Rewrite it if a competitor could use it as is.
- Swap gradient text, glows and tilted mockups for plain large type, a real product screenshot and a button that names the first step.
On this page
The hero is the first thing anyone sees, and on a generated site it’s usually the most generic part. If you only have time to fix one section, fix this one. People only read the rest of the page if the hero gives them a reason.

This post goes through one rewrite from start to finish. The example product is a small invoicing app for freelancers. Swap in your own product as you go. Each step has our Claude Code prompt, so you can run the same pass on your site.
The before
Here is a hero of the kind an agent produces when you ask for “a modern landing page for my invoicing app”:
<!-- BEFORE: a typical generated hero -->
<section class="relative overflow-hidden bg-slate-950 py-32 text-center">
<div class="absolute inset-0 bg-gradient-to-br from-indigo-600/30 via-purple-600/20 to-transparent blur-3xl"></div>
<span class="rounded-full bg-white/10 px-4 py-1 text-sm text-indigo-300">
<svg class="inline size-4"><!-- sparkles icon --></svg> Now with AI
</span>
<h1 class="mt-6 bg-gradient-to-r from-indigo-400 to-purple-400 bg-clip-text text-6xl font-bold text-transparent">
Unlock Your Financial Potential
</h1>
<p class="mx-auto mt-6 max-w-xl text-lg text-slate-400">
Streamline your workflow with our seamless, powerful invoicing platform built for the modern era.
</p>
<div class="mt-10 flex justify-center gap-4">
<a class="rounded-lg bg-indigo-600 px-6 py-3 text-white shadow-lg shadow-indigo-500/50">Get Started</a>
<a class="rounded-lg border border-slate-700 px-6 py-3 text-white">Learn More</a>
</div>
<img src="/mockup-3d.png" class="mx-auto mt-16 rotate-3 rounded-2xl shadow-2xl" alt="Dashboard" />
</section>
Count the defaults: a dark background with a blurred violet glow, a sparkle badge, a gradient headline, a sentence that could describe any software, two buttons that say nothing, a glowing shadow and a tilted mockup. Nothing in it is about invoices.
We’ll fix it in five passes. Do them in this order, because each one depends on the one before. The copy sets the length of the headline, and the length sets the type size. Type size then limits the layout and the image. Do them out of order and you’ll redo earlier passes.
Keep each prompt small. A prompt that says “make the hero better” lets the agent swap one set of defaults for another. Five narrow prompts, each saying exactly what to change and what to leave alone, keep every decision yours.
Pass 1: the headline and the sentence below it
Copy comes first. Layout and type can’t rescue a headline with nothing to say.
A good hero headline says what the product does for the reader, in their words. Write down three things before you prompt: who it’s for, what they do with it, and one concrete result. For our example: freelancers, send invoices and get paid, payments are matched to invoices automatically.
Rewrite the hero copy in src/components/Hero.astro. Product: invoicing for freelancers.
Detail: incoming bank payments are matched to invoices automatically.
Headline: under 8 words, says what the reader gets, no adjectives like powerful or
seamless. Subheading: one sentence, under 25 words, with one concrete detail.
Give me five headline options before you change the file.
Asking for options helps. The first one is often the most predictable, and five give you more to pick from. Pick the most specific one, or combine two. Read each one out loud and ask if a competitor could put it on their site as is. If they could, it’s too vague. Ours:
Send the invoice. We’ll tell you when it’s paid.
Your bank payments are matched to invoices as they arrive, so you stop checking your account and chasing the wrong clients.
If you want a longer list of words to remove, see words that make a landing page sound AI-written.
Pass 2: type
Remove the gradient text and let size and weight do the work. Use one family for headings and one for text, or a single family at clearly different sizes.
In the hero, remove bg-clip-text and every gradient class from the headline. Use the
display font from the @theme block, text-5xl on desktop and text-4xl on phones,
font-semibold, tracking-tight, leading-tight, color text-ink. Subheading: text-lg,
text-muted, max-w-xl. Don't change the copy.
If you haven’t picked fonts yet, pick fonts that don’t say “an AI made this” covers how.
The gradient goes because it’s a very common look in generated heroes, and it can make the text harder to read. Large, dark, tightly set type on a plain background looks more confident than any color effect.
Pass 3: layout
Centered text over a centered image is the default because it’s safe. A split layout puts the words and the product side by side, which is more useful. The reader sees what you’re describing while they read it.
Make the hero two columns on lg and up: left-aligned text left, product image right.
Container and section padding from CLAUDE.md. Stack text then image on phones. Use
bg-canvas. Remove the glow div, the dark background and overflow-hidden.
You don’t need a light canvas. A dark hero is fine if your whole site is dark. It’s the glow that makes the before look generic.

Example: Boost, a designed Astro template on Aymu.
Pass 4: the visual
Remove the tilted 3D mockup. Use a real screenshot of the best screen in your product instead. For an invoicing app, that’s the invoice list with a few marked paid, not the settings page.
Replace /mockup-3d.png with src/assets/screens/invoices-paid.png, imported and rendered
with the Image component from astro:assets.
Remove rotate-3 and all shadows. Frame: rounded-xl bg-surface, no border, no device frame.
Alt: "Invoice list with three invoices marked paid by matched bank payments".
Take the screenshot at a real browser size, crop it to the part that matters and use realistic sample data.
Pass 5: the call to action
“Get Started” and “Learn More” tell the reader nothing. They don’t say what happens after the click, so the reader has to guess if it’s a form, a sales call or a credit card prompt. Name the first thing they’ll do. Use one main button, and a quiet second option only if it really helps.
Replace the hero buttons. Primary: "Send your first invoice" to /signup, bg-accent
text-accent-ink. Secondary: text link "See how matching works" to #matching, underline on
hover. Remove the sparkle badge.
The after
---
// AFTER: src/components/Hero.astro
import { Image } from 'astro:assets';
import invoicesPaid from '../assets/screens/invoices-paid.png';
---
<section class="bg-canvas py-24 md:py-32">
<div class="mx-auto grid max-w-6xl items-center gap-12 px-4 md:px-8 lg:grid-cols-2">
<div>
<h1 class="font-display text-4xl font-semibold leading-tight tracking-tight text-ink md:text-5xl">
Send the invoice. We'll tell you when it's paid.
</h1>
<p class="mt-6 max-w-xl text-lg text-muted">
Your bank payments are matched to invoices as they arrive, so you stop checking your account and chasing the
wrong clients.
</p>
<div class="mt-10 flex flex-wrap items-center gap-6">
<a href="/signup" class="rounded-lg bg-accent px-6 py-3 text-accent-ink">
Send your first invoice
</a>
<a href="#matching" class="text-ink hover:underline">
See how matching works
</a>
</div>
</div>
<Image
src={invoicesPaid}
alt="Invoice list with three invoices marked paid by matched bank payments"
class="rounded-xl bg-surface"
/>
</div>
</section>
Fewer classes than the before, and each one is a decision.
Check it
Before you finish, have the agent run the dev server and take screenshots at phone and desktop width. Then check a short list. The headline fits in two lines on desktop. Nothing overflows on a phone. The main button shows without scrolling on a phone. The screenshot is sharp. No gradient, glow or shadow is left in the section. Have it report what fails before it fixes anything, so you can see what it found.

The full version of that loop is in screenshot, critique, fix.
What to do today
Run the five passes on your own hero, in order: copy, type, layout, visual, call to action. Commit after each one so you can compare. When you’re done, the rest of the page will probably look worse next to it. That’s a good sign. It shows you which section to fix next.
Share this post
Ask an AI about this post
Written byMuhammad SumonDeveloper and UI/UX designer

