JSFiddle - React, Tailwind, and code Playground

HTML

<body>
<img src="http://www.darrobric.com/clients/dimming/1.jpg" class="thumbnail"
  alt="Image 1" width="20" height="20"/>

<img src="http://www.darrobric.com/clients/dimming/2.jpg" class="thumbnail"
  alt="Thumbnail 2" width="20" height="20"/>

    <div id="imageWrap">
        <img src="http://www.darrobric.com/clients/dimming/C.jpg" alt="Main Image" class="active" />
    </div>
</body>

CSS

#imageWrap{
    position:relative;
    overflow:hidden;
    height:400px;
    width:200px;
}
.next{
    display:none;
}
#imageWrap img{
    width: 200px;
    position: absolute;
    top: 0;
    left: 0;
}

JavaScript

$('.thumbnail').on('click',function(){
    if (!$('#imageWrap .active').is(':animated')){
        $('#imageWrap').append('<img src="' + $(this).attr('src') + '" class="next" />');
        $('#imageWrap .active').fadeOut(1000, function(){
            $(this).remove();
        });
        $('#imageWrap .next').fadeIn(1000, function(){
            $(this).addClass('active');
        });
    }

});