JSFiddle - React, Tailwind, and code Playground

HTML

<div id="firstdiv" class="sample">
    	     Go Down
</div>
<div id="space">Space</div>
 <div id="wanimate">Top</div>

CSS

.sample{
    font-size: 35px;
    color: blue;
}
#space{
    visibility: hidden;
    height: 800px;
}
#tops,#wanimate{
    color: white;
    height: 60px;
    width: 80px;
    background-color: grey;
    position: relative;
    bottom: 0px;
    cursor: pointer;
    text-align:center;
    
}

JavaScript

//In Jquery
$('#firstdiv').on("click", function(){
    $('html, body').animate({"scrollTop" : $(document).height() - $(window).height()});
});

$("#wanimate").on("click",function(){$('html, body').animate({"scrollTop" : "0px"})});