To fix INP, find the specific slow interaction in field data, work out which of its three phases is slow (input delay, processing duration or presentation delay), and apply the fix for that phase. For input delay, break up the long tasks that block the main thread. For processing duration, make event handlers do less and yield before the non-urgent work. For presentation delay, shrink the rendering work the next frame needs. A page passes when its 75th-percentile INP is 200 ms or less. Over 500 ms is poor.

This guide works through that process in order: diagnose with field data, reproduce in the lab, then fix by phase. Every API and version below was checked against web.dev, Chrome's documentation, MDN's compatibility data and the web-vitals package as of November 2026.

What INP measures, briefly

Interaction to Next Paint observes every click, tap and key press during a page visit. Hover and scroll don't count. For each interaction it measures the time from the input to the next frame the browser paints. The page's INP is the longest interaction observed, ignoring one outlier for every 50 interactions, so on most pages it's simply the worst interaction.

INP at p75 Rating
≤ 200 ms Good
> 200 ms and ≤ 500 ms Needs improvement
> 500 ms Poor

The thresholds apply to the 75th percentile of page loads, segmented by mobile and desktop. Mobile is usually where you fail, because the same JavaScript runs on a CPU several times slower.

Each interaction has three phases, and they add up to the total latency:

  1. Input delay: from the user's input until your event callbacks start running. It's long when the main thread is busy with something else.
  2. Processing duration: the time your event callbacks take to run.
  3. Presentation delay: from the end of your callbacks until the browser paints the next frame (style, layout, paint, compositing).

Treat these phases as the diagnosis. A 400 ms INP made of 350 ms of input delay needs a completely different fix from one made of 350 ms of presentation delay.

Step 1: Confirm the problem in field data

Start with real-user data, not Lighthouse. Lighthouse in navigation mode doesn't interact with the page, so it can't measure INP.

Search Console's Core Web Vitals report groups similar URLs and flags the groups whose INP fails, separately for mobile and desktop. It's built on Chrome UX Report (CrUX) data. Use it to find which template is failing: product pages, search results, the article template.

The CrUX API gives you the p75 and distribution for a URL or origin. The CrUX API documentation lists the metric as interaction_to_next_paint:

curl -s "https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=$CRUX_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/products/widget",
    "formFactor": "PHONE",
    "metrics": ["interaction_to_next_paint"]
  }' | jq '.record.metrics.interaction_to_next_paint.percentiles.p75'

CrUX tells you that a page is slow, not why. It has no INP phase breakdown and no element attribution. For that you need your own real-user monitoring.

Collect attribution with the web-vitals library

The web-vitals library (6.2.3 is the latest release as of November 2026) ships an attribution build that breaks INP into its phases and names the element involved. These field names are from the package's INPAttribution type:

import { onINP } from 'web-vitals/attribution';

onINP(({ value, rating, attribution }) => {
  const a = attribution;
  const payload = {
    value,
    rating,
    target: a.interactionTarget,         // CSS selector of the element
    type: a.interactionType,             // 'pointer' | 'keyboard'
    inputDelay: a.inputDelay,
    processingDuration: a.processingDuration,
    presentationDelay: a.presentationDelay,
    loadState: a.loadState,              // was the page still loading?
    script: a.longestScript?.entry.sourceURL,
    scriptFn: a.longestScript?.entry.sourceFunctionName,
    scriptPhase: a.longestScript?.subpart, // which phase the script landed in
    styleLayout: a.totalStyleAndLayoutDuration,
  };
  navigator.sendBeacon('/rum/inp', JSON.stringify(payload));
});

Three fields deserve explanation:

  • longAnimationFrameEntries holds the Long Animation Frame (LoAF) entries that overlap the interaction. longestScript summarizes the worst script among them, including its source URL and which phase it fell in. This is how you find out a third-party tag is to blame.
  • loadState tells you whether the interaction happened during load. A cluster of slow interactions with a loading state points to script evaluation competing with early clicks.
  • interactionTarget is a selector, so you can group by element and fix the worst offender first.

Browser support matters when you read this data. onINP() works in Chromium, Firefox and Safari according to the library's README, but MDN's compatibility data shows LoAF only in Chrome (from version 123). Script attribution therefore comes only from Chromium users. That's usually enough to find the culprit.

Step 2: Reproduce it in the lab

With a target element and a dominant phase in hand, reproduce the interaction locally.

Open Chrome DevTools' Performance panel. Per Chrome's documentation, it shows live LCP, CLS and, once you interact, INP. It also logs every interaction in an Interactions table and can pull CrUX field data to compare with your local numbers. Turn on CPU throttling (DevTools can suggest a setting based on your field data), since a fast laptop will hide most INP problems. Hovering an interaction shows its input delay, processing duration and presentation delay.

Then record a trace while doing the slow interaction. In the flame chart, look for:

  • A long task already running when you clicked: input delay.
  • Your handler's call stack taking most of the interaction: processing duration.
  • Long purple (style and layout) or green (paint) blocks after the handler: presentation delay.
  • Purple blocks inside your handler flagged as forced reflow: layout thrashing, which inflates processing duration.

Fixing input delay

Input delay means something else held the main thread when the user acted. web.dev defines any task over 50 ms as a long task. Common sources are hydration, script evaluation during load, timers and analytics batches.

Break up long tasks by yielding

The pattern from web.dev uses scheduler.yield() where it exists and falls back to setTimeout:

function yieldToMain() {
  if (globalThis.scheduler?.yield) {
    return scheduler.yield();
  }
  return new Promise(resolve => setTimeout(resolve, 0));
}

async function processItems(items) {
  let lastYield = performance.now();
  for (const item of items) {
    process(item);
    // Yield roughly every 50 ms instead of after every item
    if (performance.now() - lastYield > 50) {
      await yieldToMain();
      lastYield = performance.now();
    }
  }
}

Prefer scheduler.yield() where it exists. Its continuation runs ahead of other queued tasks, while a setTimeout continuation goes to the back of the queue, behind third-party tasks. As of MDN's compatibility data in November 2026, scheduler.yield() is supported in Chrome and Edge 129+ and Firefox 142+, and not in Safari. Keep the fallback.

Don't use navigator.scheduling.isInputPending() to decide when to yield. web.dev now says "we no longer recommend using this API". Yield on a time budget regardless.

Reduce what runs during load

If your RUM data shows slow interactions with loadState of loading or dom-interactive, the fix is shipping less JavaScript early: code-split routes, defer non-critical bundles, and use islands or partial hydration where your framework supports it. Our Astro vs Next.js comparison covers how each framework handles that trade-off.

Fixing processing duration

web.dev's advice is blunt: do "as little work as possible" in event callbacks.

Paint first, then do the rest

Update what the user needs to see, then move everything else into a later task so the browser can present a frame first:

saveButton.addEventListener('click', async () => {
  saveButton.disabled = true;
  status.textContent = 'Saving…';   // the visible response

  await yieldToMain();              // let the browser paint

  const draft = serializeEditor();  // expensive, not visual
  await fetch('/api/drafts', { method: 'POST', body: draft });
  sendAnalytics('draft_saved');
});

INP stops counting at the next paint, so anything after the yield is outside the interaction as long as it doesn't block that frame. If you can't make the handler async, the requestAnimationFrame + setTimeout combination from web.dev defers work until after the next frame:

requestAnimationFrame(() => {
  setTimeout(() => {
    sendAnalytics('draft_saved'); // runs after the next frame is presented
  }, 0);
});

Debounce high-frequency inputs

Typing into a search box fires a key event per keystroke. If each one filters a 5,000-row list, every key press is a slow interaction. Keep the input update immediate and debounce the expensive part:

function debounce(fn, ms) {
  let id;
  return (...args) => {
    clearTimeout(id);
    id = setTimeout(() => fn(...args), ms);
  };
}

const runFilter = debounce(q => renderResults(filter(rows, q)), 150);
searchInput.addEventListener('input', e => runFilter(e.target.value));

Stop layout thrashing

Reading a layout property (offsetHeight, getBoundingClientRect()) after writing styles forces the browser to calculate layout synchronously. In a loop, it does this on every iteration:

// Bad: write, read, write, read... forces layout each iteration
cards.forEach(card => {
  card.style.width = `${container.offsetWidth / 3}px`;
  card.dataset.h = card.offsetHeight;
});

// Good: batch all reads, then all writes
const colWidth = container.offsetWidth / 3;
const heights = cards.map(card => card.offsetHeight);
cards.forEach((card, i) => {
  card.style.width = `${colWidth}px`;
  card.dataset.h = heights[i];
});

In the web-vitals payload, a high totalStyleAndLayoutDuration alongside high processing duration usually means forced layout inside your handler. LoAF script entries also expose forcedStyleAndLayoutDuration per script, if you log longAnimationFrameEntries directly.

React: mark non-urgent updates

In React 19, use useTransition or useDeferredValue to keep the urgent update (the input, the pressed tab) separate from the expensive re-render. Transition renders are interruptible, so a new key press can cut in.

import { useState, useDeferredValue, memo } from 'react';

const Results = memo(function Results({ query }) {
  const items = expensiveFilter(query);
  return <ul>{items.map(i => <li key={i.id}>{i.name}</li>)}</ul>;
});

export default function Search() {
  const [query, setQuery] = useState('');
  const deferredQuery = useDeferredValue(query);
  return (
    <>
      <input value={query} onChange={e => setQuery(e.target.value)} />
      <Results query={deferredQuery} />
    </>
  );
}

Two documented gotchas. First, the slow child must be wrapped in memo, or it re-renders with the parent anyway and the optimization does nothing. Second, React's docs say transition updates "can't be used to control text inputs". Keep the input's own state synchronous and defer the consumer, as above. Neither hook makes rendering faster. If Results takes 300 ms to render, it still costs 300 ms of main-thread time, just in an interruptible way. Virtualize long lists too. For framework-level differences in update cost, see our Svelte 5 vs React 19 comparison.

Fixing presentation delay

Presentation delay is rendering work: recalculating styles, laying out, painting. It grows with how much of the DOM the update touches.

Keep the DOM small

web.dev's guidance is that small DOMs render quickly and large ones make both initial rendering and interaction updates more expensive. Typical wins:

  • Virtualize long lists and tables instead of rendering thousands of rows.
  • Don't keep hidden tabs, modals and mega-menus fully rendered when they could render on open.
  • Avoid deeply nested wrapper elements generated by component libraries.

Skip off-screen rendering with content-visibility

content-visibility: auto lets the browser skip rendering for elements outside the viewport. Pair it with contain-intrinsic-size so the scrollbar doesn't jump:

.feed-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

MDN's compatibility data lists content-visibility in Chrome 85+, Firefox 125+ and Safari 18+. It helps most on long pages where an interaction triggers a style recalculation across many elements.

Be careful with large client-side HTML updates

Building and inserting large amounts of HTML in JavaScript blocks the next frame until the whole thing is done. If an interaction swaps in a big fragment (for example, "load 200 more products"), render the first screenful, yield, then append the rest in chunks.

Third-party scripts

Tag managers, chat widgets, A/B testing tools and ad scripts are the most common source of input delay that isn't your code. The longestScript.entry.sourceURL field in the attribution data shows which origin is responsible. Then:

  1. Remove what nobody uses. Audit the tag manager. Old pixels from finished campaigns are common.
  2. Load late. Load non-essential widgets after the page is interactive, or on first user intent (for example, load the chat widget when someone hovers the chat button).
  3. Use facades for embeds such as video players and maps: a static placeholder that loads the real script on click.
  4. Watch A/B testing tools. Client-side experiment scripts often run synchronously, and that hurts input delay during load.

Measure before and after each removal using the same RUM pipeline. Then wait for CrUX to catch up: it's a rolling 28-day window, so fixes show up in Search Console gradually, not overnight.

A quick triage table

Dominant phase Likely cause First fix
Input delay, during load Script evaluation, hydration Ship less JS early, code-split, defer
Input delay, after load Timers, third-party tasks, long tasks Yield in long tasks, audit third parties
Processing duration Heavy handlers, forced layout Paint first then yield, batch reads/writes, debounce
Processing duration (React) Large synchronous re-render useDeferredValue / useTransition + memo, virtualize
Presentation delay Large DOM, big style recalc Shrink DOM, content-visibility, chunk HTML inserts

For a broader site check, run the SEO audit tool to catch the other technical issues that usually ship alongside slow templates. Our technical SEO tools roundup covers crawlers that report Core Web Vitals at scale.

Frequently Asked Questions

What is a good INP score?

An INP of 200 ms or less at the 75th percentile of page loads is good. Between 200 and 500 ms needs improvement, and above 500 ms is poor. Google evaluates mobile and desktop separately, so check both.

Why does Lighthouse not show INP?

INP needs real user interactions, and a standard Lighthouse navigation run doesn't click or type. Use field data from CrUX or your own RUM to find slow interactions. Then reproduce them in the DevTools Performance panel, which reports live INP as you interact.

Is scheduler.yield() safe to use in production?

Yes, with feature detection. As of November 2026 it's supported in Chrome and Edge 129+ and Firefox 142+, but not in Safari. The yieldToMain() helper above falls back to setTimeout, so Safari users still get the yield, just without the continuation priority.

How long does it take for INP fixes to show in Search Console?

Search Console's Core Web Vitals report uses CrUX data, which covers a rolling 28-day window. Expect the p75 to move gradually over about four weeks after deploying a fix. Your own RUM data will show the change immediately, so use that to confirm the fix worked.

Do useTransition and useDeferredValue fix slow React renders?

They don't make rendering faster. They mark the update as interruptible so urgent input isn't blocked behind it. You still need memo on the slow child, and often list virtualization, to reduce the actual work.

Does INP measure scrolling?

No. INP only observes clicks, taps and key presses. Scrolling, hovering and zooming are excluded, although a click, tap or key press that happens as part of those gestures can still count as an interaction.

Conclusion

INP problems are rarely mysterious once you have phase-level attribution. Collect inputDelay, processingDuration, presentationDelay and the longest script from the web-vitals attribution build, group by interactionTarget, and fix the worst element first using the fix for its dominant phase. Yield inside long tasks, paint before doing non-urgent work, avoid forced layout, keep the DOM small, and question every third-party script. Then confirm with your own RUM before waiting for CrUX to catch up.