JSFiddle - React, Tailwind, and code Playground
HTML
<p>Click inside the text fields to see a yellow background:</p>
<form>
First name: <input id = "abc" type="text" name="firstname"><br>
</form>
CSS
input:focus {
background-color: yellow;
}
JavaScript
document.getElementById('abc').focus()