I am trying to find a way where when one of the links below is clicked, similarly to the nav-tabs class in Bootstrap, the current link style changes to the active style and the previously clicked link reverts back to normal style. Does Bootstrap 5 have a quick way of changing the style or does it need to be done through normal CSS/JS?
<ul class="nav nav-pills flex-column">
<li><a class="nav-link link-light" asp-controller="Home" asp-action="Index" asp-route-SortString="Award" asp-route-StatusId="@Context.Request.Query["StatusId"]">Highest Awarded</a></li>
<li><a class="nav-link link-light" asp-controller="Home" asp-action="Index" asp-route-SortString="Update" asp-route-StatusId="@Context.Request.Query["StatusId"]">Last Updated</a></li>
<li><a class="nav-link link-light" asp-controller="Home" asp-action="Index" asp-route-SortString="Newest" asp-route-StatusId="@Context.Request.Query["StatusId"]">Date Added (Newest)</a></li>
<li><a class="nav-link link-light" asp-controller="Home" asp-action="Index" asp-route-SortString="Oldest" asp-route-StatusId="@Context.Request.Query["StatusId"]">Date Added (Oldest)</a></li>
</ul>
So, for instance, if I click on Highest Awarded, the previously clicked link reverts to normal style and Highest Awarded link adds active in its class, thus changing the style to that of active.