JSFiddle - React, Tailwind, and code Playground
HTML
<div id="products-list">
<div class="product">
My Wiki product
</div>
</div>
CSS
#products-list {
position:relative;
display: flex;
flex-flow: row wrap;
width:100%;
}
#products-list .product {
min-width:150px;
max-width:100%;
margin:10px 10px 20px 10px;
flex:1;
background: red;
}
#products-list .product .product-image {
position:relative;
width:100%;
padding-bottom:100%;
background-color:#c43333;
}
#products-list .product .product-image img {
position:absolute;
top:0px;
right:0px;
bottom:0px;
left:0px;
width:100%;
height:100%;
}
#products-list .product .product-name {
width:100%;
height:20px;
line-height:20px;
background-color:#b3afaf;
}
#products-list .product .product-price {
width:100%;
height:20px;
line-height:20px;
background-color:#b3afaf;
font-weight:bold;
}
JavaScript
var stop = 5;
var ci = setInterval(function(){
var p = $('.product:first').clone();
$('#products-list').append(p);
stop--;
if (stop<=0) clearInterval(ci);
},2000);