Pattern · TypeScript
Core Web Vitals in a production Next.js app: LCP, INP, CLS
Practical levers: LCP image priority, stable layout, splitting heavy JS.
Level: intermediateTime estimate: ~1 h for an audit
Google’s metrics reflect real UX; Next gives SSR and image optimization, but CLS often comes from banners and fonts.
- LCP: explicit hero priority and correct image dimensions
- CLS: reserve height for dynamic slots
- INP: avoid blocking the main thread with heavy above-the-fold bundles
Core Web Vitals are not vanity scores: they correlate with retention and conversion. Below is a minimal checklist with the App Router.
Code
LCP priority for a hero image:
import Image from 'next/image'
export function Hero() {
return (
<Image
src="/hero.webp"
alt=""
width={1200}
height={630}
priority
sizes="(max-width: 768px) 100vw, 1200px"
/>
)
}
Reserved height for an ad or dynamic slot:
<div className="min-h-[120px]" aria-hidden={false}>
{/* banner or widget */}
</div>
Verification
- PageSpeed Insights / CrUX field data (when available) on target URLs.
- No sharp CLS spikes when fonts load or banners inject.
Sources
More patterns
- Next.js
Canonical URL and page metadata in Next.js App Router
A generateMetadata pattern with canonical and Open Graph — baseline SEO hygiene.
Open pattern - Indexing
Dynamic sitemap.xml in Next.js (app/sitemap.ts)
One sitemap with static and content URLs; aligned with collectIndexableUrls and canonical URLs.
Open pattern
Blog posts
- Process
Site handoff checklist: speed, accessibility, and baseline tech SEO before you sign
Why to look at PageSpeed Insights and WAVE before sign-off, how lab metrics differ from field data, and a minimum tech SEO bar that reduces post-launch surprises.
Read article - Marketing
“We have a website, but no leads”: where it breaks is meaning, not code
Why a technically sound site may not produce leads: templated copy, buyer language mismatch, weak differentiation, and no path from the first screen to the form. A self-check list for owners.
Read article
Need this implemented for your domain and stack?
Short form: name, phone, and site. After you submit, we reply with next steps and a phase outline; details are refined on a call.