JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

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