JSFiddle - React, Tailwind, and code Playground
HTML
<div class="duplicate">
<p>Form Duplicate</p> <a href="#" class="add">Add Guest</a> | <a href="#" class="remove">Remove </a>
</div>
<button>Clone</button>
JavaScript
$(".remove").click(function(e) {
$(this).closest(".duplicate").remove();
e.preventDefault();
});
$("button").click(function() {
$(".duplicate:last").clone(true).insertBefore(this);
});