Vanillatop is a light vanilla JavaScript plugin for creating a scroll to top button on web page.
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>