JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container" style="position:relative; height:400px; width:100%; overflow:auto; background:red">
    <div id="div1" class="clicker" style="height: 1000px; width 100px; ; background:blue">Test</div>
    <div id="div2" class="clicker" style="height: 1000px; width 100px; background:green">Test 2</div>
    <div id="div3" class="clicker" style="height: 1000px; width 100px; background:yellow">Test 3</div>
</div>

JavaScript

$(".clicker").click(function () {
    $('#container').animate({
        scrollTop: WHAT GOES HERE ?
    }, 2000);

});