Hey! For a smooth js scroll to element, I’ve had good luck with `element.scrollIntoView({ behavior: 'smooth' })`. It’s vanilla JS and works decently across browsers.
If you want custom easing, you might need to ditch the native smooth scroll and use `requestAnimationFrame` with a custom easing function. Check out this tutorial on CSS-Tricks for a deep dive: https://css-tricks.com/snippets/jquery/s...scrolling/ (yes, it’s jQuery, but the logic translates to vanilla).
Also, Safari can be a pain—polyfills like `smoothscroll-polyfill` might help if you’re hitting inconsistencies.
If you want custom easing, you might need to ditch the native smooth scroll and use `requestAnimationFrame` with a custom easing function. Check out this tutorial on CSS-Tricks for a deep dive: https://css-tricks.com/snippets/jquery/s...scrolling/ (yes, it’s jQuery, but the logic translates to vanilla).
Also, Safari can be a pain—polyfills like `smoothscroll-polyfill` might help if you’re hitting inconsistencies.
