Looking to implement a side navigation with active class in Vue3 while also adding a border-left style similar to the image provided.
https://i.sstatic.net/Q4dN3.png
The current setup looks like this: https://i.sstatic.net/PupIX.png
Here's an excerpt from SideBar.vue:
<div class="flex flex-col space-y-9 mt-4 -mx-6 ">
<RouterLink v-for="(mu, idx) in menu" :key="idx" class="flex text-[#A09F9F] cursor-pointer "
:to="mu.route">
<img :src="mu.icon" class="w-6 h-6 mr-2 ml-3" />
<span class="text-center text-lg">{{ mu.text }} </span>
</RouterLink>
</div>
For router.js:
https://i.sstatic.net/t6ef5.png
Implementing the .active class:
.active {
color: #3C59A8 !important;
font-weight: bold;
background: linear-gradient(90deg, #E8E9EA 0%, #FAFAFA 100%);
transition: .2s;
border-left: #3C59A8 4px solid;
}
Struggling to achieve the rounded border on the left side as shown in the initial image. Any suggestions would be appreciated!
Thank you.
Tried using border-left and ::before without success.