JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

   <div class="st-box">
   <input type="text" id="search1" name="ref_name[]" class="st-reg-step2 no-line" placeholder="Please."/>
      <input type="text" name="ref_name[]" class="st-reg-step2 no-line" placeholder="Другой инпут"/><br>
     </div>
    
  <div class="st-box">
    <input type="text" id="search2" name="ref_name[]" class="st-reg-step2 no-line" placeholder="Please."/>
    <input type="text" name="ref_name[]" class="st-reg-step2 no-line" placeholder="Другой инпут"/><br>
   </div>
  <span id="add-btn">Add+</span>
  <button id="remove-btn">
  Удалить
  </button>

CSS

#remove-btn {
  display: none;
}

JavaScript

jQuery('#add-btn').click(function(){
                        jQuery(this).prev(".st-box").clone().insertBefore(this);
                        jQuery('#remove-btn').show();
                        jQuery('.st-box input:first-child').last().attr( "id", "search"+jQuery('.st-box').length );
                    })

                    jQuery('#remove-btn').click(function(){
                        if( jQuery('.st-box').length > 1 ){
                            jQuery('.st-box').last().remove();
                        }
                        if( jQuery('.st-box').length < 2 ){
                            jQuery('#remove-btn').hide();
                        }
                    })