One file. Zero deps. Back to top instantly.
This is a digital download. No physical item will be shipped.
By purchasing you agree to our Terms of Service. A 30-day refund is available โ see our Refund Policy.
A polished, production-ready scroll-to-top button that fades in automatically once the user has scrolled 300 px down the page. It uses a single requestAnimationFrame loop for buttery smooth scrolling โ no jQuery, no external libraries, just one self-contained JS file under 1 KB minified.
Drop the file into your project, add one line of HTML, and it works. Everything visual is driven by CSS custom properties, so changing the colour, size, corner radius, position, and animation easing is a matter of editing a handful of variables โ no digging through source code.
The button is fully accessible: it renders as a proper <button> element with an aria-label, respects prefers-reduced-motion, and is fully keyboard operable. It won't interfere with any other scroll behaviour on your page, and it cleans up after itself if you remove it from the DOM.