JSFiddle - React, Tailwind, and code Playground
HTML
<video class="thumb" autoplay loop onclick="expandVid(this)">
<source src="http://zippy.gfycat.com/PolishedBelatedAltiplanochinchillamouse.webm" type="video/webm" />
<img src="." alt="Your browser does not support HTML5 video tag" />
</video>
CSS
video.thumb {
max-width: 200px;
max-height: 200px;
}
JavaScript
function expandVid(elem) {
if (elem.className) { // Is thumb
elem.className = ''; // Expand it
} else if (!elem.hasAttribute('controls')) { // Is not thumb and has no controls
elem.className = 'thumb'; // Make it thumb
}
}