Micro Snippet โšก $3

ScrollTop Button

One file. Zero deps. Back to top instantly.

ScrollTop Button preview
ScrollTop Button
$3
One file. Zero deps. Back to top instantly.
๐Ÿ”’Secure checkout via Stripe
๐Ÿ“งYou will receive a download link by email after successful payment
๐Ÿ”„Lifetime updates included
โ†ฉ๏ธ30-day refund policy

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.

About this product

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.

Features

  • Fade-in after 300 px scroll
  • Smooth scroll to top
  • CSS custom properties for theming
  • < 1 KB minified
  • No dependencies

Files included

  • scrolltop.js
  • scrolltop.min.js
  • demo/index.html
  • README.md
Licence Single-site ยท Personal & commercial use ยท No redistribution or resale