Z, F & Layer-Cake Reading
Animated gaze paths over a wireframe show how people scan a page in a Z, an F or a layer-cake.
AI prompt
Diagram of three web page wireframes side by side overlaid with a red gaze path, the first showing a Z shaped path from top left to top right then diagonally to bottom left and across to bottom right, the second showing an F shaped path with two horizontal bars at the top and a vertical line down the left edge, the third showing short horizontal marks at three section headings, light grey wireframe blocks, thin red lines with small dots, clean flat style, labelled beneath. Negative: heat maps, photos, text errors, clutter. Reduced motion: static diagram.About this pattern
Definition
People rarely read a page word by word; they scan it. On sparse pages with a clear goal the eye often follows a Z. On text-heavy pages it follows an F, reading the top lines fully and then scanning down the left. On pages with clear headings it jumps from heading to heading like layers of a cake.
When to use it
- Z pattern: put the logo top left, the action top right, the key message diagonally, the final call to action bottom right.
- F pattern: front-load the first words of each line and keep important items on the left.
- Layer cake: use strong headings so scanners can jump between sections.
What the controls do
- Three pattern buttons and a Replay button.
Motion & timing
- The path draws in about 1.6 seconds.
- Reduced motion: the full path is shown at once.
Tips & variations
- These are tendencies from eye-tracking studies, not rules; test with real users.
- Plan the hierarchy first, then check the gaze path.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Pattern"><button data-p="0" aria-pressed="true">Z pattern</button><button data-p="1" aria-pressed="false">F pattern</button><button data-p="2" aria-pressed="false">Layer cake</button></div><svg class="wf" viewBox="0 0 300 160" role="img" aria-label="Wireframe with gaze path"><rect x="10" y="8" width="60" height="14" rx="3" fill="#d4d4cf"/><rect x="220" y="8" width="70" height="14" rx="7" fill="#c9d3f0"/><rect x="10" y="40" width="190" height="10" rx="3" fill="#d4d4cf"/><rect x="10" y="58" width="150" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="70" width="170" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="94" width="150" height="10" rx="3" fill="#d4d4cf"/><rect x="10" y="112" width="190" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="124" width="140" height="6" rx="3" fill="#e4e4e0"/><rect x="220" y="136" width="70" height="16" rx="8" fill="#c9d3f0"/><path id="gz" pathLength="1" fill="none" stroke="#e5484d" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg><div class="two"><p class="out" id="out"></p><button class="mini" id="rp" type="button">Replay</button></div></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}
.wf{width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:#fff}#gz{stroke-dasharray:1;stroke-dashoffset:1}#gz.go{animation:dr 1.6s ease-out forwards}@keyframes dr{to{stroke-dashoffset:0}}.mini{height:30px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:12px;font-weight:600;cursor:pointer}.mini:disabled{opacity:.4;cursor:default}.two{grid-template-columns:1fr auto;align-items:center}@media (prefers-reduced-motion:reduce){#gz.go{animation:none;stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const D=['M16 15L255 15L16 144L255 144','M16 15L290 15M16 45L200 45M16 45L16 148','M16 15L90 15M16 45L120 45M16 99L120 99'],T=['Z pattern: sparse pages. Logo, action, diagonal, final call to action.','F pattern: text-heavy pages. Top lines read fully, then a scan down the left.','Layer cake: the eye jumps between headings, so write strong headings.'],gz=document.getElementById('gz'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){gz.setAttribute('d',D[p]);gz.classList.remove('go');void gz.getBoundingClientRect();gz.classList.add('go');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();}));document.getElementById('rp').addEventListener('click',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>Z, F & Layer-Cake Reading — 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}
.wf{width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:#fff}#gz{stroke-dasharray:1;stroke-dashoffset:1}#gz.go{animation:dr 1.6s ease-out forwards}@keyframes dr{to{stroke-dashoffset:0}}.mini{height:30px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:12px;font-weight:600;cursor:pointer}.mini:disabled{opacity:.4;cursor:default}.two{grid-template-columns:1fr auto;align-items:center}@media (prefers-reduced-motion:reduce){#gz.go{animation:none;stroke-dashoffset:0}}
@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="Pattern"><button data-p="0" aria-pressed="true">Z pattern</button><button data-p="1" aria-pressed="false">F pattern</button><button data-p="2" aria-pressed="false">Layer cake</button></div><svg class="wf" viewBox="0 0 300 160" role="img" aria-label="Wireframe with gaze path"><rect x="10" y="8" width="60" height="14" rx="3" fill="#d4d4cf"/><rect x="220" y="8" width="70" height="14" rx="7" fill="#c9d3f0"/><rect x="10" y="40" width="190" height="10" rx="3" fill="#d4d4cf"/><rect x="10" y="58" width="150" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="70" width="170" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="94" width="150" height="10" rx="3" fill="#d4d4cf"/><rect x="10" y="112" width="190" height="6" rx="3" fill="#e4e4e0"/><rect x="10" y="124" width="140" height="6" rx="3" fill="#e4e4e0"/><rect x="220" y="136" width="70" height="16" rx="8" fill="#c9d3f0"/><path id="gz" pathLength="1" fill="none" stroke="#e5484d" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg><div class="two"><p class="out" id="out"></p><button class="mini" id="rp" type="button">Replay</button></div></div>
</div>
<script>
const D=['M16 15L255 15L16 144L255 144','M16 15L290 15M16 45L200 45M16 45L16 148','M16 15L90 15M16 45L120 45M16 99L120 99'],T=['Z pattern: sparse pages. Logo, action, diagonal, final call to action.','F pattern: text-heavy pages. Top lines read fully, then a scan down the left.','Layer cake: the eye jumps between headings, so write strong headings.'],gz=document.getElementById('gz'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){gz.setAttribute('d',D[p]);gz.classList.remove('go');void gz.getBoundingClientRect();gz.classList.add('go');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();}));document.getElementById('rp').addEventListener('click',up);up();
</script>
</body></html>