Under The Hood
frontend browser W3C Event Timing API / Chrome 122+ Core Web Vital

Interaction to Next Paint (INP): Input Delay, Processing, and Presentation

Last updated
Prerequisites:
Browser Event Loop phases
Layout reflow & compositor paint pipeline
  • browser
  • web-vitals
  • inp
  • performance
  • event-timing
  • main-thread

Read at your depth

The practical view

Interaction to Next Paint (INP) is a Core Web Vital replacing First Input Delay (FID). It measures responsiveness by tracking the latency of all user interactions (clicks, taps, keypresses) throughout the entire page lifecycle. INP represents the worst (or 98th percentile) interaction latency, divided into three phases: Input Delay, Processing Duration (event handler execution), and Presentation Delay (style, layout, paint, and frame rendering). Good INP is <= 200ms.

The same idea in other frameworks

react equivalent
`useTransition()` and `startTransition()` yield priority to urgent user input to prevent INP spikes.

Legacy vs modern

Blocking Event Handler vs Yielded Async Task Pipeline

Synchronous heavy operations block the main thread and spike INP; yielding to the scheduler allows the browser to paint the feedback frame immediately.

before → after
Monolithic Long Task Handler
button.addEventListener('click', () => { computeHeavyReport(); updateUI(); }); // ❌ Spikes INP
Yielding with scheduler.yield()
await scheduler.yield(); // ✅ NEW: Allows browser to paint feedback before heavy work

Interview gotchas

Context

Interviewers test your historical and architectural knowledge of Core Web Vitals.

The mechanical answer

FID only measured the *input delay* (waiting time) of the *very first* user interaction, ignoring the execution time of event listeners and subsequent rendering/painting time entirely. It also ignored all subsequent interactions on the page. INP measures the *total roundtrip duration* (Input Delay + Processing Duration + Presentation Delay) for *all* interactions throughout the session, accurately reflecting real-world UI responsiveness.

Trap

Do not state that FID measured click-to-render latency. FID only measured the time from click to the moment the JavaScript handler *began* executing.

Under The Hood — a multi-depth technical interview hub.

Third-party licenses Press ⌘ K to search.