JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
    <div id="arrowL">
    </div>
    <div id="arrowR">
    </div>
    <div id="list-container">
        <div class='list'>
            <div class='item'>
            </div>
            <div class='item'>
            </div>
            <div class='item'>
            </div>
            <div class="item">
            </div>
        </div>
    </div>
</div>

CSS

#container{
width:340px;
    height:50px;
}

#list-container {
overflow:hidden;    
width: 300px;  
float:left;    
}

.list{
    background:grey;
min-width:700px;
    float:left;
}


#arrowR{
background:yellow;
    width:20px;
    height:50px;
    float:right;
    cursor:pointer;
}


#arrowL{
background:yellow;
    width:20px;
    height:50px;
    float:left;
    cursor:pointer;
}

.item{
    background:green;
width:140px;
    height:40px;
    margin:5px;
    float:left;
}

JavaScript

$(document).ready(function() {
    
    $('div#arrowR').click(function(){
    
        $('div.item').animate({'left':'-=300px'});

    });
    
    $('div#arrowR').click(function(){
    
        $('div.item').animate({'left':'+=300px'});

    });
    
});