JSFiddle - React, Tailwind, and code Playground
HTML
<div id="fullwidget">
<div class="widget-style" id="widget"><a id="widget" hef="#"> Click here for more info</a>
<span class="arrowup">↑</span>
<span class="arrowdown">↓</span>
</div>
<div class="contact-style" id="contact">Contact
<hr>
<p>More information in here</p>
<p>And More information in here</p>
<p>More information in here</p>
<p>And More information in here</p>
</div>
</div>
CSS
.widget-style {
width: 300px;
height: 20px;
background-color: black;
color: white;
font-size: 18px;
text-align: center;
vertical-align: bottom;
padding: 14px;
cursor: pointer;
border-radius: 0px;
z-index: 9;
}
.contact-style {
width: 298px;
height: 230px;
background-color: white;
border: 1px solid #000;
color: black;
font-size: 18px;
text-align: left;
padding: 14px;
cursor: pointer;
}
p {
font-size: 14px;
}
#fullwidget {
width: 300px;
height: 250px;
position: fixed;
left: 0px;
right: 0px;
bottom: -201px;
margin-left: auto;
margin-right: auto;
transition: 0.6s;
}
.widgetActive {
bottom: 0px;
}
JavaScript
$(document).ready(function () {
//↑ Up arrow
//↓ Down arrow
$(".arrowdown").hide();
$(".arrowup").show();
$("#widget").click(function () {
$(".arrowup").toggle();
$(".arrowdown").toggle();
$("#fullwidget").toggleClass("widgetActive");
});
});