Technical

Cumulative Layout Shift (CLS)

Cumulative Layout Shift (CLS) is a Core Web Vital metric that quantifies how much visible content unexpectedly shifts during the page lifecycle, measuring visual stability.

CLS captures the frustrating experience of content jumping around as a page loads — clicking a button only to have an ad push it down, or trying to read text that shifts because an image loaded above it. Google targets CLS under 0.1.

Common CLS causes: images without explicit dimensions, dynamically injected content above existing content, web fonts causing a flash of unstyled text (FOUT), and ads or embeds without reserved space.

In Next.js, the `<Image>` component automatically reserves space (preventing CLS) when you provide `width` and `height`. Use `next/font` with `display: "swap"` for font loading. Always set explicit dimensions on iframes and ad containers. Indxel flags missing image dimensions during page audits.

Example

// Next.js Image prevents CLS by reserving space
import Image from "next/image";

// Good: width and height reserve space
<Image src="/logo.png" alt="Logo" width={200} height={50} />

// Also good: fill mode with sized container
<div className="relative h-[400px] w-full">
  <Image src="/hero.jpg" alt="Hero" fill className="object-cover" />
</div>

Stop shipping broken SEO

Indxel validates your metadata, guards your CI/CD pipeline, and monitors indexation — so you never miss an SEO issue again.