Вкладки с плавными переходами и активной кнопкой.
uc-tabs-menu, кнопкам — tab.uc-tab.<style>
.uc-tabs-menu .tab,
.uc-tabs-menu .tab .tn-atom{
cursor:pointer !important;
border-radius:150px !important;
transition:all .35s ease !important;
}
.uc-tabs-menu .tn-atom__button-text{
transition:color .35s ease !important;
}
/* hover + active */
.uc-tabs-menu .tab:hover,
.uc-tabs-menu .tab.active,
.uc-tabs-menu .tab:hover .tn-atom,
.uc-tabs-menu .tab.active .tn-atom{
background:linear-gradient(
90deg,
#199093 0%,
#0c5059 100%
) !important;
}
.uc-tabs-menu .tab:hover .tn-atom__button-text,
.uc-tabs-menu .tab.active .tn-atom__button-text{
color:#fff !important;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
/* кнопки */
const tabs = document.querySelectorAll(".uc-tabs-menu .tab");
/* блоки */
const tabBlocks = document.querySelectorAll(".uc-tab");
/* первая вкладка активна */
if(tabs[0]){
tabs[0].classList.add("active");
}
/* показываем только первый блок */
tabBlocks.forEach((block, index) => {
if(index === 0){
block.style.display = "block";
} else {
block.style.display = "none";
}
});
/* клики */
tabs.forEach((tab, index) => {
tab.addEventListener("click", function () {
/* active */
tabs.forEach(t => t.classList.remove("active"));
this.classList.add("active");
/* скрываем все блоки */
tabBlocks.forEach(block => {
block.style.display = "none";
});
/* показываем нужный */
if(tabBlocks[index]){
tabBlocks[index].style.display = "block";
}
});
});
});
</script>