JSFiddle - React, Tailwind, and code Playground
HTML
<div class='user-nav'>
<button class="drop-menu-button">Menu</button>
</div>
<div class='drop-menu'>
<ul>
<li><a href='#'>My Profile</a></li>
<li><a href='#'>Logout</a></li>
</ul>
</div>
CSS
.user-nav {
height: 50px;
background-color: black;
}
.drop-menu {
display: none;
position: relative;
height: 60px;
top: -20px;
}
.drop-menu ul::before {
content: '';
width: 0;
height: 0;
position: absolute;
top: -30px;
left: 30px;
border-width: 15px;
border-color: transparent transparent red transparent;
border-style: solid;
}
.drop-menu ul {
background-color: red;
position: relative;
top: 20px;
z-index: 999;
}
JavaScript
$('.drop-menu-button').click(function() {
$('.drop-menu').slideToggle(1000);
});