Animated Sidebar/navbar.css
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body
{
    height: 100vh;
}
.navbar
{
  
    width: 100px;
    height: 95vh;
    transition: all 0.2s linear;
    background-color: orange;
   position: fixed;
   left: 20px;
   top: 10px;
   border-radius: 20px;
   overflow-x: hidden;
}
.navbar.active
{
    width: 300px;
    background-color: palevioletred;
}
.navbar ul{
   
    width: 100%;
    height: 100%;
   position:absolute;
   top: 0;
   left: 0;
    padding-left: 15px;
    padding-top: 20px;
    padding-right: 20px;
}
.navbar ul li
{
    list-style-type: none;
    position: relative;
    width: 100%;
    overflow: hidden;
}
.navbar ul .active
{
    background: white;
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    border-bottom-right-radius: 15px;
    border-top-right-radius: 15px;
}
.navbar ul li a{
    display: flex;
    position: relative;
    text-decoration: none;
    color: white;
}
.navbar ul li a .icon
{
    position: relative;
    min-width: 60px;
    height: 60px;
    text-align: center;
    line-height: 70px;
}
.navbar ul li a .icon i
{
    font-size: 1.35em;
}
.navbar ul .active a .icon i
{
    color: black;
}

.navbar ul li a .text
{
   
    position: relative;
    height: 50px;
    padding-left: 20px;
    line-height: 65px;
}
.navbar ul .active a .text
{
    color: black;
}
.togglebtn
{
    width: 40px;
    height: 40px;
    background: red;
    position: fixed;
    top: 10px;
    right: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.togglebtn.active
{
    background: palevioletred;
}
.togglebtn.active .close,.togglebtn .open
{
    display: block;
}
.togglebtn.active .open,.togglebtn .close
{
    display: none;
}