JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button">Show and Focus</button>
<div style='height:700px'></div>
<input type="text" id="input" style='display:none;'/>

JavaScript

$("button").on("click",function(){
   $("#input").show();
    $("#input").focus();
});