JSFiddle - React, Tailwind, and code Playground
HTML
<div class="yourContainer">
<div style="background:red;">some html</div>
<div style="background:yellow;">Other HTML</div>
<div style="background:blue;">4 HTML</div>
<div style="background:greed;">5 HTML</div>
</div>
CSS
.yourContainer{ position:relative; }
.yourContainer div{ position:absolute; hight:300px; width:300px; }
JavaScript
$(function(){
$('.yourContainer div:gt(0)').hide();
setInterval(function(){$('.yourContainer :first-child').fadeOut(1000).next("div").fadeIn(400).end().appendTo('.yourContainer');}, 3000);
});