Next.js · Senior · Question 62 of 75
The site uses scroll-behavior: smooth, and after upgrading to Next.js 16 every navigation scrolls smoothly to the top. How do you restore instant jumps?
- ✓Correct answer: Add
data-scroll-behavior="smooth"to<html>so Next.js temporarily overrides it during navigation - 2Remove
scroll-behaviorfrom all CSS - 3Set
scroll={false}on every link
Explanation
Next.js 16 no longer overrides scroll-behavior by default because the manipulation was costly on every navigation. The attribute opts back into the old behavior.