JSFiddle - React, Tailwind, and code Playground
HTML
<select id="mySelect" onChange="check(this);">
<option>Choose Your Name</option>
<option>Frank</option>
<option>George</option>
<option>Other</option>
</select>
<div id="other-div" style="display:none;">
<label>Enter your Name
<input id="other-input"></input>
</label>
</div>
JavaScript
function check(elem) {
// use one of possible conditions
// if (elem.value == 'Other')
if (elem.selectedIndex == 3) {
document.getElementById("other-div").style.display = 'block';
} else {
document.getElementById("other-div").style.display = 'none';
}
}