content logo

Bootstrap Sidebars:

Bootstrap Collapsing Right Sidebar Menu

If you are looking for bootstrap to make your website more attractive, look at this post and use it for your page. The Bootstrap Collapsing Right Sidebar Menu has a different theme and you can change the design of your website. With the help of this Responsive Sidebar Code, you can make your page more private. Because applying this code looks like using the sidebars and you don’ see any header. As a result, the HTML Right Sidebar allows you to have a better website and gain more visitors.

There is a beautiful preview for this Bootstrap Sidebar Code and you can see its amazing performance. As you see here, the main page of this preview is totally white and you can use it if you have a simple page. This Collapsing Sidebar Menu has an icon on the up-right corner in black color. After clicking on this icon, you can see some titles with a collapsing effect. This section has a gray background. There is a profile photo at the top of the page and you can see some items that you can change their names. Some white then lines separate these items. If you put the mouse on each item, its color changes to white.

#

Responsive Sidebar Code

#

HTML Right Sidebar

#

Bootstrap Sidebar Code

#

Collapsing Sidebar Menu

<!-- This script got from frontendfreecode.com -->
<div class="container Menu">
    <div class="col-6 col-sm-6 col-xs-6 col-lg-6 col-xl-6 bars">
        <img src="http://frontendfreecode.com/img/bars.png" />
    </div>
    <div class="col-6 col-lg-6 col-xl-6 col-sm-6 col-xs-6 row SideMenu">
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item ">
            <img src="http://frontendfreecode.com/img/pngtree-girl-illustration-behind-view-png-image_1506098.jpg" class="Menu-item-img" />
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 1
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 2
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 3
        </div>

        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 4
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 5
        </div>
    </div>
    <div class="col-6 col-sm-6 col-xs-6 col-lg-6 col-xl-6 Menu-close">
        <img src="http://frontendfreecode.com/img/shift-icon.png" />
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
.Menu {
  position: relative;
}
.Menu .Menu-close {
  position: absolute;
  top: 50%;
  left: -5%;
  display: none;
}
.Menu .Menu-close img {
  width: 1.2rem;
  height: 1.5rem;
}
.Menu .bars {
  padding: 2rem;
  right: 0;
  position: absolute;
  z-index: 100000;
}
.Menu .bars img {
  width: 3rem;
  height: 3rem;
}
.Menu .SideMenu {
  transform: scaleX(0);
  transform-origin: right;
  background-color: rgba(0, 0, 0, 0.3);
  transition: 0.5s all ease-in-out;
}
.Menu .SideMenu .Menu-item {
  text-align: center;
  font-size: 1.5rem;
  padding: 1rem;
  border-bottom: 1px solid white;
}
.Menu .SideMenu .Menu-item img {
  border-radius: 50%;
  width: 5rem;
  height: 5rem;
}
.Menu .SideMenu .Menu-item:hover {
  background-color: white;
}
.Menu .SideMenu-active {
  transform: scaleX(1);
  transition: 0.5s all ease-in-out;
}
$(document).ready(function () {
    $('.bars').click(function () {
        $('.SideMenu').addClass('SideMenu-active');
        $('.bars').fadeOut(300, "linear");
        $('.Menu-close').fadeIn();
    });
    $('.Menu-close').click(function () {
        $('.SideMenu').removeClass('SideMenu-active');
        $('.Menu-close').fadeOut();
        $('.bars').fadeIn(300, "linear");
    });
})
<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-awesome-cursor/0.3.1/jquery.awesome-cursor.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fontawesome-iconpicker/3.2.0/js/fontawesome-iconpicker.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-awesome-cursor/0.3.1/jquery.awesome-cursor.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fontawesome-iconpicker/3.2.0/js/fontawesome-iconpicker.min.js'></script>
<style>
.Menu {
  position: relative;
}
.Menu .Menu-close {
  position: absolute;
  top: 50%;
  left: -5%;
  display: none;
}
.Menu .Menu-close img {
  width: 1.2rem;
  height: 1.5rem;
}
.Menu .bars {
  padding: 2rem;
  right: 0;
  position: absolute;
  z-index: 100000;
}
.Menu .bars img {
  width: 3rem;
  height: 3rem;
}
.Menu .SideMenu {
  transform: scaleX(0);
  transform-origin: right;
  background-color: rgba(0, 0, 0, 0.3);
  transition: 0.5s all ease-in-out;
}
.Menu .SideMenu .Menu-item {
  text-align: center;
  font-size: 1.5rem;
  padding: 1rem;
  border-bottom: 1px solid white;
}
.Menu .SideMenu .Menu-item img {
  border-radius: 50%;
  width: 5rem;
  height: 5rem;
}
.Menu .SideMenu .Menu-item:hover {
  background-color: white;
}
.Menu .SideMenu-active {
  transform: scaleX(1);
  transition: 0.5s all ease-in-out;
}
</style>

</head>
<body>
<div class="container Menu">
    <div class="col-6 col-sm-6 col-xs-6 col-lg-6 col-xl-6 bars">
        <img src="http://frontendfreecode.com/img/bars.png" />
    </div>
    <div class="col-6 col-lg-6 col-xl-6 col-sm-6 col-xs-6 row SideMenu">
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item ">
            <img src="http://frontendfreecode.com/img/pngtree-girl-illustration-behind-view-png-image_1506098.jpg" class="Menu-item-img" />
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 1
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 2
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 3
        </div>

        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 4
        </div>
        <div class="col-12 col-sm-12 col-xs-12 col-lg-12 col-xl-12 Menu-item text">
            Item 5
        </div>
    </div>
    <div class="col-6 col-sm-6 col-xs-6 col-lg-6 col-xl-6 Menu-close">
        <img src="http://frontendfreecode.com/img/shift-icon.png" />
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
$(document).ready(function () {
    $('.bars').click(function () {
        $('.SideMenu').addClass('SideMenu-active');
        $('.bars').fadeOut(300, "linear");
        $('.Menu-close').fadeIn();
    });
    $('.Menu-close').click(function () {
        $('.SideMenu').removeClass('SideMenu-active');
        $('.Menu-close').fadeOut();
        $('.bars').fadeIn(300, "linear");
    });
})
</script>

</body>
</html>
Preview