Core Web Vitals are three measurements Google uses to judge how a page feels to a real visitor. Single-page apps tend to fail them in predictable ways, which is good news: the fixes are predictable too.

The three numbers

  • LCP (Largest Contentful Paint): when the biggest element in the viewport finishes rendering. Good is 2.5 seconds or less.
  • INP (Interaction to Next Paint): how long the page takes to respond visually to a click, tap or key press, measured across the whole visit. Good is 200 ms or less. INP replaced First Input Delay in 2024.
  • CLS (Cumulative Layout Shift): how much content jumps around while loading. Good is 0.1 or less.

Google evaluates the 75th percentile of real visits, so the goal is that three out of four visitors get a good experience, not that your own laptop does.

LCP: get the main content into the HTML

A client-rendered app sends an empty page, downloads JavaScript, runs it, fetches data and only then paints. LCP waits for all of it.

What moves the number most:

  1. Render on the server or at build time. Angular and Next.js can both prerender pages to static HTML. The browser paints the content while the framework loads in the background.
  2. Prioritize the LCP image. Do not lazy-load the hero image. Give it fetchpriority="high" and explicit dimensions, and serve it in WebP or AVIF at the size it is displayed.
  3. Stop blocking the first paint. Self-host fonts with font-display: swap, inline the small amount of CSS the first screen needs, and defer anything below the fold.

INP: keep the main thread free

INP gets bad when a click has to wait for JavaScript that is already running, or triggers a large amount of work itself.

  • Ship less JavaScript up front. Split by route and load heavy pieces, like a chart or a 3D scene, only when they are needed.
  • Break up long tasks. Anything over 50 ms blocks input. Move heavy computation to a web worker, or yield between chunks of work.
  • Render less on each interaction. In React, keep state close to where it is used so a keystroke does not re-render the page. In Angular, signals and OnPush limit change detection to what actually changed.
  • Show feedback first. Update the pressed state or show a spinner immediately, then start the expensive work.

CLS: reserve the space

Layout shift is nearly always something arriving late without a reserved box.

  • Set width and height (or aspect-ratio) on every image, video and embed.
  • Reserve space for content that loads later: skeletons the same size as the real thing, not a spinner that collapses.
  • Never insert banners above existing content after load.
  • Match the fallback font's metrics to the web font with size-adjust, so text does not reflow when the font swaps in.

Measure real visits

Lighthouse in DevTools is a lab test on your machine. It is useful for debugging, but it cannot measure INP properly because nobody is interacting. For real data:

  • PageSpeed Insights shows field data from Chrome users if the page has enough traffic.
  • Search Console has a Core Web Vitals report grouped by page type.
  • The web-vitals library reports the three metrics from your own visitors to any analytics endpoint.

Fix in this order: LCP first, because it usually has the largest gap and the clearest remedy; then CLS, which is often a few missing dimensions; then INP, which takes profiling. Measure again after each change, because a fix for one metric can move another.