JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#">First Link</a>
<a href="#">Second Link</a>
<a href="#">Third Link</a>
<a href="#">Fourth Link</a>
<a href="#">Fifth Link</a>
<a href="#">Sixt Link</a>
CSS
a:focus{color:blue}
a {
color:inherit;
text-decoration: none;
}
JavaScript
$(document).keydown(
function(e)
{
if (e.keyCode == 39) {
$("a:focus").next().focus();
}
if (e.keyCode == 37) {
$("a:focus").prev().focus();
}
}
);