Skip to main content
Services
Hire developers
Company
CoachOSPortfolio
Contact us+91 95124-74119info@globerixai.com

What Is CLS (Cumulative Layout Shift)? How to Measure and Fix It

Cumulative Layout Shift explained: the good threshold, what causes layout shifts, how to find them and the fixes that work, including in React and Next.js.

3 min read. Updated November 16, 2026. By the GloberixAI editorial team.

What is Cumulative Layout Shift (CLS)?

Cumulative Layout Shift (CLS) is a Core Web Vital that measures how much visible content moves unexpectedly while a page loads or is used. Google treats a CLS of 0.1 or less as good, 0.1 to 0.25 as needing improvement and more than 0.25 as poor, judged at the 75th percentile of real visits. Common causes are images without dimensions, late ads or embeds, web fonts and content inserted above what you are reading.

CLS at a glance

Core Web Vitals thresholds: LCP is good at 2.5 seconds or less, INP at 200 milliseconds or less and CLS at 0.1 or less
Core Web Vitals thresholds at a glance. Google assesses them at the 75th percentile of real visits.
CLS at a glance
CLS scoreRatingWhat users experience
0.1 or lessGoodThe page feels stable
0.1 to 0.25Needs improvementOccasional jumps that can cause mis-taps
More than 0.25PoorContent moves enough to frustrate or mislead

How CLS is calculated

Every time a visible element changes position without the user asking for it, the browser records a layout shift. Its score is the share of the viewport affected (the impact fraction) multiplied by how far the element moved (the distance fraction).

Shifts that happen in quick succession are grouped into session windows, and the page's CLS is the worst window. Shifts that occur within a moment of a tap or click are not counted, because the user expected something to change.

The most common causes of layout shift

  • Images, video and iframes without width and height, so the browser cannot reserve space.
  • Ads, embeds, cookie banners and widgets that load late and push content down.
  • Web fonts that swap in with different letter sizes, so text reflows.
  • Content injected above what the visitor is already reading.
  • Animations that change top, left or height instead of using transforms.
  • Components that appear only after JavaScript loads, with no placeholder.

How to fix CLS, step by step

  1. Find the shifting elements: PageSpeed Insights lists them, and Chrome DevTools can highlight layout shifts as they happen.
  2. Give every image, video and iframe width and height attributes, or set a CSS aspect-ratio.
  3. Reserve space for ads, embeds and banners with a minimum height, or overlay them instead of pushing content.
  4. Load fonts with a close fallback font and preload the important one, so the swap barely moves text.
  5. Add skeleton placeholders with fixed dimensions for content that loads later.
  6. Animate with transform and opacity, which do not move surrounding content.
  7. Never insert new content above existing content unless the user asked for it.

Key takeaway: If you fix only one thing, set dimensions on every image and embed. It removes the most common cause of poor CLS.

Fixing CLS in React and Next.js

Frameworks help but do not guarantee a stable layout. In Next.js, the Image component requires dimensions and the font module reduces font shifts. Watch for banners or personalised blocks that render only after hydration, and give them a reserved container so the page does not jump when they appear.

How to measure CLS

Lab tests often miss shifts that happen later in a visit, such as after scrolling, so a page can look fine in Lighthouse and still show poor CLS in field data.

  • Search Console and PageSpeed Insights show field data from real visitors.
  • Lighthouse and DevTools help you reproduce and diagnose shifts in a lab.
  • The web-vitals JavaScript library records CLS from your own visitors.

Keep going

CLS is one of three metrics. Read the full Core Web Vitals guide, then see how to improve LCP and INP. Our web development team builds sites to pass all three.

Frequently asked questions

What is a good CLS score?

0.1 or less at the 75th percentile of real visits. Between 0.1 and 0.25 needs improvement, and above 0.25 is poor.

Why is my CLS high in field data but fine in Lighthouse?

Lighthouse measures a single page load in a lab. Real visitors scroll, interact and see late content, so shifts that happen later in a visit show only in field data.

Does CLS affect SEO?

It is part of Google's page experience signals, so it can help, but content relevance matters far more. A stable page also converts better.

Can CLS be zero?

Yes. A page whose elements all have reserved space and never move unexpectedly can score 0.

Want help with this?

Tell us what you are building and we will reply within 24 hours on business days.