How to Add a "Scroll to Top" Button in website (theme"Radiant" latest).

Hello, Shopify partners, users and the experts, hope you are doing well.

I’m looking to add a “Scroll to Top” button on my Shopify store so that visitors can easily return to the top of the page after scrolling down. I want it to appear once the user scrolls down a bit and be fixed at the bottom corner (preferably right side).

Has anyone done this before or can guide me through the process? I’m comfortable editing the theme code if needed. Any help or code snippets would be greatly appreciated!

Here’s the sample image but I want that I can adjust colours according to my need later in the code.

Thanks in advance!

Abdullah.

You may not need to edit theme code – this is a good idea to avoid it alltogether to allow for easier theme updates.

Can even be done without JS.

If you have a sticky header, you can add a “Custom Liquid” section to your “Header Group” sections group. The code can be similar to:


  BTT

You’d only need to find a snippet which renders an arrow-up SVG in your theme and include {% render “snippetname” %} instead of the BTT…

Thanks alott :beating_heart: .