JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block">
<input id="ip" type="text" />
<div class="res">NULL</div>
</div>
CSS
div {
position:absolute;
left:50%;
width:50%;
height:50%;
margin:50px;
top:50%;
}
JavaScript
var d = false;
$("#ip").keyup(function(){
if(d ==false){
$(".block").animate({"top": "-=50px"});
d= true;
}
var v =$(this).val();
$(".res").html("Search results for " + v );
});