JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" class="inputs" maxlength="4"/>
<input type="text" class="inputs" maxlength="4"/>
<input type="text" class="inputs" maxlength="4"/>
JavaScript
$(".inputs").keyup(function () {
if (this.value.length == this.maxLength) {
$(this).next('.inputs').focus();
}
});