JSFiddle - React, Tailwind, and code Playground
HTML
<div class="thumbnail">
<img src="http://i59.tinypic.com/10cvw8y.jpg" class="template-img">
<aside tab-index="1" class="hover">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<button class="button" onclick="alert('wow')">CLICK ME</button>
</aside>
</div>
CSS
.thumbnail {
position: relative;
overflow: hidden;
}
.template-img {
width: 100%;
height: 100%;
}
.template-img:hover ~ .hover {
transform: translateX(0);
}
.template-img:focus {
pointer-events: none;
}
.template-img:focus ~ .hover {
transform: translateX(0);
transition: none;
}
.hover {
position: absolute;
top: 0;
width: 100%;
height: 100%;
padding-top: 15%;
transform: translateX(-100%);
transition: transform .4s ease-out;
pointer-events: none;
background: rgba(255, 0, 0, 0.4);;
z-index: 10;
}
.button {
pointer-events: auto;
}