Lately, I've noticed a growing trend in navigation bars that are designed to resemble waves.
Wavey Navbar
I'm eager to incorporate a similar navbar into my website, but I'm struggling to figure out how to do it. I'm working with reactjs, which means I'm utilizing Html & CSS. Despite my efforts, all my attempts result in sharp edges, unlike the smooth half-circle look I desire:
My Navbar
I'm uncertain if I'm executing the design correctly, but one issue is that the shadow effect isn't displaying in the circular section as intended.
Here's a snippet of my code:
.navbar {
flex-wrap: nowrap;
width: 100vw;
height: 65px;
align-content: stretch;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 0;
box-shadow: 0 -3px 5px 0 rgba(0,0,0,.09);
z-index: 999;
}
.navLink {
width: 20%;
height: 100%;
flex-direction: column;
font-size: xx-small;
justify-content: center;
font-weight: 700;
-webkit-transition: all 1s;
transition: all 1s;
background-color: #FFFFFF;
align-items: center;
}
.selectedLink {
padding-bottom: 25px;
height: 40px;
background-color: white;
background: radial-gradient(circle at top, transparent 34px, #FFF 20px);
display: flex;
flex-direction: row;
}
.icon {
width: 26px;
height: 26px;
}
.selectedLinkImage {
border-radius: 200px;
margin-bottom: 37px;
background-color: #564cac;
padding: 7px;
border: 6px solid transparent;
box-shadow: 0 -3px 5px 0 rgba(0,0,0,.50);
}
<nav class="navbar">
<div class="navLink selectedLink" id="feed-link">
<img class="icon selectedLinkImage" src="/static/media/home-active.9de5b1c3.svg" alt="feed button">
</div>
<div class="navLink" id="discover-link">
<img class="icon" src="/static/media/discover.a882adf8.svg" alt="discover button">
</div>
<div class="navLink" id="map-link">
<img class="icon" src="/static/media/map.9188e95b.png" alt="like button"> </div>
<div class="navLink" id="like-link">
<img class="icon" src="/static/media/heart.754f2ae1.svg" alt="like button"> </div>
<div class="navLink" id="purchase-link">
<img class="icon" src="/static/media/purchased.9bc694d4.svg" alt="purchased button">
</div>
</nav>