JSFiddle - React, Tailwind, and code Playground
HTML
<div class="horizontal-scroll-wrapper squares">
<div>item 1</div>
<div>item 2</div>
<div>item 3</div>
<div>item 4</div>
<div>item 5</div>
<div>item 6</div>
<div>item 7</div>
<div>item 8</div>
</div>
CSS
::-webkit-scrollbar{width:2px;height:2px;}
::-webkit-scrollbar-button{width:2px;height:2px;}
::-moz-scrollbar{width:2px;height:2px;}
::-moz-scrollbar-button{width:2px;height:2px;}
::scrollbar{width:2px;height:2px;}
::scrollbar-button{width:2px;height:2px;}
div{
box-sizing:border-box;
}
body {
background: #111;
}
.horizontal-scroll-wrapper{
position:absolute;
display:block;
top:0;
left:0;
width:80px;
max-height:500px;
margin:0;
background:#abc;
overflow-y:auto;
overflow-x:hidden;
transform:rotate(-90deg) translateY(-80px);
transform-origin:right top;
}
.horizontal-scroll-wrapper > div{
display:block;
padding:5px;
background:#cab;
transform:rotate(90deg);
transform-origin: right top;
}
.squares{
padding:60px 0 0 0;
}
.squares > div{
width:60px;
height:60px;
margin:10px;
}
.rectangles{
top:100px;
padding:100px 0 0 0;
}
.rectangles > div{
width:140px;
height:60px;
margin:50px 10px;
padding:5px;
background:#cab;
transform:rotate(90deg) translateY(80px);
transform-origin: right top;
}