Hero Layout Patterns
Four hero wireframes: centered, split, offset and overlap, with advice on when each one fits.
AI prompt
Wireframe sheet of four landing page hero sections in a two by two grid, each using the same content, a headline, two grey text lines, a dark button and a pale image block: top left centred and symmetrical, top right split with text on the left and image on the right, bottom left asymmetric with the image offset lower and larger, bottom right with the image filling the frame and a white text card overlapping its lower left corner, light grey and white palette, clean flat style, small labels beneath each. Negative: real photos, colour, text errors, browser chrome. Reduced motion: static sheet.About this pattern
Definition
The hero is the first block of a page and sets its tone. Four structures cover most needs: centred text for a single message, a split for text beside an image, an offset layout for a more editorial feel, and an overlap where a text card sits on a large image.
When to use it
- Centred: one strong headline and one action; best for simple products.
- Split: text and a product image side by side; the safe default.
- Offset: text and image on different baselines for an editorial rhythm.
- Overlap: image fills the frame with a text card over it; needs a strong image.
What the controls do
- Four layout buttons applied to the same wireframe content.
Motion & timing
- The wireframe re-arranges instantly.
- Reduced motion: nothing animates.
Tips & variations
- Stack all four to a single column on small screens, text first.
- Keep one primary action visible without scrolling.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Layout"><button data-p="0" aria-pressed="true">Centered</button><button data-p="1" aria-pressed="false">Split</button><button data-p="2" aria-pressed="false">Offset</button><button data-p="3" aria-pressed="false">Overlap</button></div><div class="hv" id="hv" data-l="0"><div class="tx"><b></b><b class="s"></b><span></span><i></i></div><div class="im"></div></div><p class="out" id="out"></p></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hv{position:relative;min-height:150px;border-radius:12px;border:1px solid var(--line);background:#fff;padding:12px;display:grid;gap:10px;overflow:hidden}.tx{display:grid;gap:6px;align-content:center}.tx b{height:12px;width:80%;background:#171717;border-radius:3px}.tx b.s{width:55%}.tx span{height:6px;width:90%;background:#d4d4cf;border-radius:3px}.tx i{height:20px;width:64px;background:#2b59d6;border-radius:6px;margin-top:4px}.im{border-radius:8px;background:linear-gradient(135deg,#e1e4ea,#c6ccd8)}
[data-l="0"]{justify-items:center;text-align:center}[data-l="0"] .tx{justify-items:center;width:100%}[data-l="0"] .tx b,[data-l="0"] .tx span{margin-inline:auto}[data-l="0"] .im{width:80%;height:46px}
[data-l="1"]{grid-template-columns:1fr 1fr;align-items:center}[data-l="1"] .im{height:110px}
[data-l="2"]{grid-template-columns:.8fr 1.2fr;align-items:start}[data-l="2"] .tx{padding-top:8px}[data-l="2"] .im{height:116px;margin-top:22px;margin-right:-14px;border-radius:8px 0 0 8px}
[data-l="3"]{padding:0}[data-l="3"] .im{position:absolute;inset:0;border-radius:0}[data-l="3"] .tx{position:relative;z-index:1;background:#fff;margin:auto auto 12px 12px;width:54%;padding:10px;border-radius:10px;box-shadow:0 4px 14px rgba(0,0,0,.12)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const T=['One message, one action. Use for simple products and announcements.','The safe default. Text and a product image share equal weight.','Editorial feel. Text and image sit on different baselines.','Image-led. Needs a strong photo; keep the card text short.'],hv=document.getElementById('hv'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){hv.dataset.l=p;document.getElementById('out').textContent=T[p];bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));up();One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Hero Layout Patterns — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hv{position:relative;min-height:150px;border-radius:12px;border:1px solid var(--line);background:#fff;padding:12px;display:grid;gap:10px;overflow:hidden}.tx{display:grid;gap:6px;align-content:center}.tx b{height:12px;width:80%;background:#171717;border-radius:3px}.tx b.s{width:55%}.tx span{height:6px;width:90%;background:#d4d4cf;border-radius:3px}.tx i{height:20px;width:64px;background:#2b59d6;border-radius:6px;margin-top:4px}.im{border-radius:8px;background:linear-gradient(135deg,#e1e4ea,#c6ccd8)}
[data-l="0"]{justify-items:center;text-align:center}[data-l="0"] .tx{justify-items:center;width:100%}[data-l="0"] .tx b,[data-l="0"] .tx span{margin-inline:auto}[data-l="0"] .im{width:80%;height:46px}
[data-l="1"]{grid-template-columns:1fr 1fr;align-items:center}[data-l="1"] .im{height:110px}
[data-l="2"]{grid-template-columns:.8fr 1.2fr;align-items:start}[data-l="2"] .tx{padding-top:8px}[data-l="2"] .im{height:116px;margin-top:22px;margin-right:-14px;border-radius:8px 0 0 8px}
[data-l="3"]{padding:0}[data-l="3"] .im{position:absolute;inset:0;border-radius:0}[data-l="3"] .tx{position:relative;z-index:1;background:#fff;margin:auto auto 12px 12px;width:54%;padding:10px;border-radius:10px;box-shadow:0 4px 14px rgba(0,0,0,.12)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Layout"><button data-p="0" aria-pressed="true">Centered</button><button data-p="1" aria-pressed="false">Split</button><button data-p="2" aria-pressed="false">Offset</button><button data-p="3" aria-pressed="false">Overlap</button></div><div class="hv" id="hv" data-l="0"><div class="tx"><b></b><b class="s"></b><span></span><i></i></div><div class="im"></div></div><p class="out" id="out"></p></div>
</div>
<script>
const T=['One message, one action. Use for simple products and announcements.','The safe default. Text and a product image share equal weight.','Editorial feel. Text and image sit on different baselines.','Image-led. Needs a strong photo; keep the card text short.'],hv=document.getElementById('hv'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){hv.dataset.l=p;document.getElementById('out').textContent=T[p];bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));up();
</script>
</body></html>