Tailwind smooth scroll
Hello,
It is probably super simple but I have a simple react app in vite, the app.tsx looks like this
If I click on an anchor that has #about for example it just jumps instantly, everything online says it should be scroll-smooth.
4 Replies
I think
scroll-smooth
need to be applied to the element that is actually scrolling, is it possible that the root <html>
is the element that is scrolling and needs the class?Yep, that was it thanks so much!
Didn't think to go outside of the main app.tsx file had to go the index.html file.
I only though of it bc the tailwind docs use
<html>
in their examplesMakes sense thanks again, you probably just saved me from spending way to much time on that.