My side-menu consists of icons that display text to the right upon hovering over them. I want the text to show up and the div to expand smoothly with a sliding transition, ideally without the need for additional JavaScript.
Is there a way to achieve this?
:root {
--darkblack: #000615;
--black: #0B1721;
--lightblack: #141B37;
--yellow: #F7C921;
--darkyellow: #a28b2a;
--cyan: #21B7FF;
--darkcyan: #1c7eaf;
--magenta: #FF217D;
--darkmagenta: #531a3b;
}
.nav {
align-items: flex-end;
}
.nav-pills .nav-link {
width: fit-content;
}
.nav-pills .nav-link.active {
color: var(--black) !important;
background-color: var(--cyan);
}
.nav-pills .nav-link:not(.nav-link.active) {
color: var(--cyan) !important;
cursor: pointer;
}
.nav-pills .nav-link:hover > .nav-title {
display: inline !important;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="21434e4e55525553405161140f110f13">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="row">
<div class="col-10">
</div>
<div class="col-2">
<ul class="nav nav-pills flex-column mb-auto">
<li class="nav-item">
<a href="#" class="nav-link active" aria-current="page">
<i class="fa-solid fa-book"></i>
<span class="d-none nav-title">Bio</span>
</a>
</li>
<li>
<a class="nav-link" data-id="tags">
<i class="fa-solid fa-tags"></i>
<span class="d-none nav-title">Tags</span>
</a>
</li>
</ul>
</div>
</div>