JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<img src="http://placehold.it/450x250/b5cb94/ffffff">
<img src="http://placehold.it/450x250/7b756b/ffffff">
<img src="http://placehold.it/450x250/10346b/ffffff">
<img src="http://placehold.it/450x250/efc7de/ffffff">
</div>
CSS
body{width: 100%;}
div {
position:relative;
width: 100%;
max-width:450px;
padding:0;
margin:0 auto;
}
div img {
position: relative;
top: 0;
left: 0;
width: 100%;
height: auto;
}
JavaScript
$('img:gt(0)').hide();
setInterval(function() {
$('img:first-child').fadeOut(0).next('img').fadeIn().end().appendTo('div');
}, 4000);