TIL that browsers have now implemented native smooth scrolling
January 18, 2024 1 min read
CSS
You can just add a smooth scrolling effect via CSS:
html {
scroll-behavior: smooth;
}
TailwindCSS (my CSS framework of choice) has a built-in utility for that:
<html class="scroll-smooth">
<!-- ... -->
</html>