JSFiddle - React, Tailwind, and code Playground
HTML
<div class="gallery">
<div class="big">
<img src="http://s46.radikal.ru/i114/0912/07/c5e80592869f.jpg" />
</div>
<div class="small">
<img src="http://84.img.avito.st/640x480/411842984.jpg" data-img="http://84.img.avito.st/640x480/411842984.jpg" />
<img src="http://65.img.avito.st/640x480/364843965.jpg" data-img="http://65.img.avito.st/640x480/364843965.jpg" />
<img src="http://s1.blomedia.pl/gadzetomania.pl/images/2010/09/Balony.jpg" data-img="http://s1.blomedia.pl/gadzetomania.pl/images/2010/09/Balony.jpg" />
<img src="http://daleta.umi.ru/images/cms/data/desktopwallpapers_org_ua-680.jpg" data-img="http://daleta.umi.ru/images/cms/data/desktopwallpapers_org_ua-680.jpg" />
</div>
</div>
CSS
.gallery {max-width: 320px; height: auto; text-align: center; overflow: hidden; position: relative;}
.gallery .big img {width: 320px; height: auto;}
.gallery .small {margin-top: 5px;}
.gallery .small img {width: 24%; height: auto; cursor: pointer;}
JavaScript
$(function() {
$('.gallery .small img').on('click', function() {
$('.gallery .big img').attr('src', $(this).data('img'));
});
});