JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">      
        <input id="search" type="text" autofocus="autofocus">        
</div>

CSS

#container {
    margin: 0px auto;
    width: 300px;
    height: 300px;
    background: #333;
    position: relative;
}

#container input {
    position: absolute;
    top: 130px;
    left: 50px;
    width: 200px;
}

JavaScript

$('#search').change(function() {
  
    $('this').animate({
    top: '+=0',
  }
                      
});