JSFiddle - React, Tailwind, and code Playground
HTML
a: <input id="a" type="text" maxlength="5" />
b: <input id="b" type="text" maxlength="5" />
JavaScript
var a = document.getElementById("a"),
b = document.getElementById("b");
a.onkeyup = function() {
if (this.value.length === parseInt(this.attributes["maxlength"].value)) {
b.focus();
}
}