In this example, you will see a drawer opening from the right and occupying 40% of the width of the screen and for left-to-right drawers, set left:0
instead of right:0
for #drawer
code.
<div id="drawer" class="p-4">
<h4 class="p-3">Drawer</h4>
<div id="closeBtn">
<img src="https://htmljstemplates.com/static_files/svgs/x.svg" height="32" onclick="toggleDrawer()"></i>
</div>
<div>
</div>
</div>
<button class="btn btn-sm btn-outline-info" onclick="toggleDrawer()">Open Drawer</button>
#drawer {
display:none;
box-shadow: 2px -8px 12px rgba(0,0,0,0.4);
position:fixed;
right:0;
top:0;
height:100vh;
overflow:auto;
border-left:1px solid #eaeaea;
background:#fff;
min-width:320px;
width:40%;
z-index:999999;
}
#closeBtn {
cursor:pointer;
font-size:24px;
float:right;
margin-right:12px;
margin-top:-60px;
}
function toggleDrawer(){
$('#drawer').toggle("slide")
}
Do you want to access your webcamera remotely? Then this article is for you.
Calendar Picker / Appointment Setter JS CSS Library. Inspired by Calendly.
Create a local file sharing server with realtime sync feature using Socket IO.
Most beautiful Navbars designed with tailwind css. Fully responsive templates.
Most beautiful dashboards designed with bootstrap 5. Inspired mostly from dribble and other sources.
Most commonly used HTML email templates. Welcome email, sign up, password reset etc.
Checkout our most downloaded payment page ui designed with bootstrap.
Detect user's inactivity and auto logout after certain timeout using various JS features.
Keep the user engaged and gain recurring website traffic. Includes templates.
How to get a user's location using Javascript and other techniques available today.
This website uses cookies and similar technologies, to enhance your browsing experience and provide personalized recommendations. By continuing to use our website, you agree to our Privacy policy.