JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="wrapper-inner">
<div class="item">
<div class="viewer">One</div>
</div>
<div class="item">
<div class="viewer">Two</div>
</div>
<div class="item">
<div class="viewer">Three</div>
</div>
<div class="item">
<div class="viewer">Four</div>
</div>
<div class="item">
<div class="viewer">Five</div>
</div>
<div class="item">
<div class="viewer">Six</div>
</div>
</div>
</div>
CSS
.wrapper {
position: relative;
width: 400px;
}
.wrapper-inner {
height: 180px;
overflow-x: hidden;
overflow-y: auto;
background-color: red;
}
.viewer {
display: none;
position: absolute;
right: 0;
top: 0;
bottom: 0;
left: 200px;
background-color: orange;
}
.item {
width: 200px;
height: 60px;
background-color: green;
cursor: pointer;
outline: 1px solid black;
}
.item:hover {
background-color: cornflowerblue;
}
.item:hover .viewer {
display: block;
}