JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<select><option>Option</option></select>
<input type="text" />
<textarea></textarea>
<button>Button</button>
</form>
CSS
.selected { border: #f00 1px solid; padding: 10px; }
JavaScript
$(document).ready(function(){
$('form').find('input[type=text],textarea,select').filter(':visible:first')
.addClass('selected');
})