JSFiddle - React, Tailwind, and code Playground
HTML
<h2>Demo</h2>
<div class="shadow-outer">
<div class="outer">
<div class="shadow"></div>
<img src="http://placekitten.com/200/150">
<img src="http://placekitten.com/200/150">
<img src="http://placekitten.com/200/150">
<img src="http://placekitten.com/200/150">
</div>
</div>
CSS
.shadow_outer {
position: relative;
}
.outer {
/*position: relative;*/
background-color: gray;
padding: 30px;
overflow-y: scroll;
height: 150px;
white-space: nowrap;
}
.shadow {
position: absolute;
right: 17px; /* the ugly bit */
width: 20px;
margin-right: -20px;
height: 150px;
box-shadow: -10px 0px 20px gray;
}