Hint
Elements without dimensions, late-injected content, web fonts causing FOUT, embeds without aspect-ratio containers
CLS measures unexpected visual shifts. A score above 0.1 hurts both UX and SEO ranking.
Common causes and fixes:
1. Images without dimensions
<!-- ❌ Browser reserves no space — content shifts when image loads -->
<img src="hero.jpg" />
<!-- ✅ Browser reserves exact space upfront -->
<img src="hero.jpg" width="1200" height="600" />
2. Dynamically injected content above existing content
3. Web fonts causing FOUT/FOIT
font-display: optional or size-adjust CSS to match fallback font metrics.4. Embeds without aspect-ratio containers
<!-- ✅ Reserve 16:9 space for video -->
<div style={{ aspectRatio: '16/9' }}>
<iframe src="..." />
</div>
5. Animations that trigger layout
width, height, top, left triggers layout and can contribute to CLS. Fix: use transform: translate() instead.