Skip to main content
UI / UXMotion & InteractionDiagramIntermediate

Layout Shift (CLS)

KO: 레이아웃 시프트 (CLS)·EN: Layout Shift (CLS)·JA: レイアウトシフト(CLS)·CLS

Unexpected visual movement of rendered page elements during load—measured by Cumulative Layout Shift (CLS)—often causing misclicks

Table of Contents

Structure Diagram

Cumulative Layout Shift (CLS) Score Comparison
Unsized Ad/ImageStable LayoutLoad Timeline (s) →CLS Sc
(40, 32)Unsized Media (0.34 Poor) #3
Quick Answer

What is Layout Shift (CLS)?

Unexpected visual movement of rendered page elements during load—measured by Cumulative Layout Shift (CLS)—often causing misclicks. It is a core concept in Motion & Interaction within UI / UX.

Core Principles

Layout Shift occurs when visible content unexpectedly jumps during page load—typically because unsized images, late-loading ads, injected banners, or web fonts change element dimensions after initial paint. Google's Core Web Vitals tracks this via Cumulative Layout Shift (CLS), targeting 0.1 or lower for a Good rating.

Beyond hurting SEO, layout shifts cause frustrating misclicks (such as tapping a shifted button by mistake) and erode perceived product quality.

Practical Takeaways

  • Reserve space upfront for media and ads: Always set width/height or CSS aspect-ratio on images and embeds, and lock min-height on dynamic ad or banner slots.
  • Tame web font metric shifts: Pair font-display: swap with fallback font metric overrides (size-adjust, or next/font's automatic fallback generation) so line wrapping does not jump when custom fonts load.
  • Prefer transform for motion: Animating transform never triggers layout shifts, whereas animating height, top, or margin pushes surrounding content and inflates CLS.

Notable Examples

  • Late-injected ad banners: The classic anti-pattern where a header ad loads after 1 second and shoves an article off screen.
  • Dimension-matched skeletons: Matching skeleton card heights and aspect ratios to real content to hold CLS near 0.00.
  • Overlay notifications: Rendering dynamic alerts in fixed toast layers rather than inserting blocks above already-rendered text.