Vanillatop | Creating a Scroll to Top Button on Web Page with JavaScript

Vanillatop is a light vanilla JavaScript plugin for creating a scroll to top button on web page.

Vanillatop - Creating a Scroll to Top Button on Web Page with JavaScript

AuthorLinksMade withLast update
bernydoleOffice HomeJavaScriptSep 18, 2020

How to create a scorll to top button using Vanillatop?

1.Install vanillatop

# NPM
$ npm install vanillatop --save

2.Import vanillatop js and theme stylesheet file

<link rel="stylesheet" href="vanillatop.min.css">
<script src="vanillatop.min.js"></script>

3.Create a link with class vanillatop, this link will be displayed as a button

<a href="#" class="vanillatop"></a>

Leave a Reply

Your email address will not be published. Required fields are marked *