<div class="list-menu">
<div class="list-menu__title active active-on">Navigation</div>
<ul class="list-menu__items">
<li class="active"><a href="#">Dashboard #1</a></li>
<li><a href="#">Dashboard #2</a></li>
<li><a href="#">Dashboard #3</a></li>
<li><a href="#">Dashboard #4</a></li>
<li><a href="#">Dashboard #5</a></li>
</ul>
</div>
body {
font-family: sans-serif;
}
.list-menu {
width: 300px;
background-color: #2d353c;
&__title {
background-color: #242a31;
color: #f1f1f1;
padding: 10px 50px;
position: relative;
cursor: pointer;
&:before {
content: "";
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
width: 20px;
height: 20px;
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 271.673 271.673' style='enable-background:new 0 0 271.673 271.673;fill: %23348fe2' xml:space='preserve'%3E%3Cg%3E%3Cg%3E%3Cg%3E%3Cpath d='M114.939,0H10.449C4.678,0,0,4.678,0,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C125.388,4.678,120.71,0,114.939,0z'/%3E%3Cpath d='M261.224,0h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C271.673,4.678,266.995,0,261.224,0z'/%3E%3Cpath d='M114.939,146.286H10.449C4.678,146.286,0,150.964,0,156.735v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C125.388,150.964,120.71,146.286,114.939,146.286z'/%3E%3Cpath d='M261.224,146.286h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C271.673,150.964,266.995,146.286,261.224,146.286z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A");
}
&.active:after {
content: "";
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 129 129' xmlns:xlink='http://www.w3.org/1999/xlink' enable-background='new 0 0 129 129' style='fill: %23FFF'%3E%3Cg%3E%3Cpath d='m121.3,34.6c-1.6-1.6-4.2-1.6-5.8,0l-51,51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l53.9,53.9c0.8,0.8 1.8,1.2 2.9,1.2 1,0 2.1-0.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2 0.1-5.8z'/%3E%3C/g%3E%3C/svg%3E");
position: absolute;
right: 10px;
top: 50%;
width: 20px;
height: 20px;
transform: translateY(-50%);
transition: all 0.5s;
}
&.active.active-on:after {
transform: translateY(-50%) rotate(180deg);
}
}
&__items {
padding: 10px 50px;
position: relative;
&:before {
content: "";
position: absolute;
left: 20px;
top: 0;
width: 2px;
height: 100%;
background-color: #242a31;
}
> li {
position: relative;
&:before {
content: "";
position: absolute;
left: -30px;
top: 50%;
transform: translateY(-50%);
width: 15px;
height: 2px;
background-color: #242a31;
}
&:after {
content: "";
position: absolute;
left: -15px;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 5px;
border: 2px solid #ccc;
border-radius: 50%;
transition: all 0.5s;
}
&.active a {
color: #fff;
}
&:hover:after,
&.active:after {
border: 2px solid #348fe2;
}
}
a {
text-decoration: none;
color: #ccc;
display: block;
padding: 5px 0;
transition: all 0.5s;
&:hover {
color: #fff;
}
}
}
}
View Compiled
$(document).ready(function() {
$(".list-menu__title").on("click", function() {
$(this).toggleClass('active-on');
$(this).next('.list-menu__items').slideToggle();
});
});
This Pen doesn't use any external CSS resources.