JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="row" id="addrow">
<div class="col-md-2">
<input type="text" placeholder="Item #1" class="form-control" />
</div>
<div class="col-md-6">
<input type="text" placeholder="Description" class="form-control" />
</div>
<div class="col-md-1">
<input type="text" placeholder="Qty." class="form-control" />
</div>
<div class="col-md-1">
<input type="text" placeholder="Tax" class="form-control" />
</div>
<div class="col-md-2">
<input type="text" placeholder="Item Total" class="form-control" />
</div>
</div>
<input type='button' id='add' value='Add item' class="btn btn-success" />
<button type="button" class="btn btn-primary" id="remove">Remove</button>
JavaScript
$('#add').click(function () {
var n = $('.row').length + 1;
var temp = $('.row:first').clone();
temp.attr('id', temp.attr('id') + n);
$('input:first', temp).attr('placeholder', 'Item #' + n)
$('.row:last').after(temp);
});
$(document).ready(function () {
$("#remove").click(function () {
$(".row:last").remove();
});
});