September 23, 2022

Simple and Fast Sidebar Navigation Skeleton on Bootstrap

A simple and quick sidebar skeleton created on Bootstrap that automatically collapses to navigate out of the hamburger canvas on mobile devices. The advantage is also knowledge of sass, npm, and grunt.

bootstrap 5 collapsible sidebar, multi level sidebar menu bootstrap, bootstrap 4 responsive sidebar collapse, responsive animated navbar, skeleton css sidebar, bootstrap sidebar collapse on mobile

How to make use of it:

1. Load the jQuery and Bootstrap 4 or 5 frameworks in your HTML doc.

<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="/path/to/cdn/bootstrap.bundle.min.js"></script>

2. Load the Sidebar skeleton’s JavaScript and CSS files within the doc.

<link rel="stylesheet" href="dist/css/sidebar.css" />
<script src="dist/js/sidebar.js"></script>

3. Add the sidebar nav toggle to the navbar.

<header>
  <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
    <!-- title -->
    <a class="navbar-brand" href="#">Sidebar navigation</a>
    <!-- sidebar toggle -->
    <button class="navbar-toggler btn btn-link border-0" type="button" id="sidebar" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
  </nav>
</header>

4. Add the sidebar navigation to the principal content material of your webpage.

<div class="d-flex wrapper wrapper-navbar-used wrapper-navbar-fixed">
  <nav role="navigation" class="sidebar sidebar-bg-light" id="navigation">
    <!-- sidebar navigation -->
    <div class="sidebar-menu">
      <div class="sidebar-menu-fixed">
        Menu Items Here
      </div>
    </div>
  </nav>
  <div class="container-fluid">
    <!-- content -->
    <main role="main"></main>
  </div>
</div>

5. Customize the background color of the sidebar navigation with the next CSS classes:

<nav role="navigation" class="sidebar sidebar-bg-dark" id="navigation">
  <!-- sidebar navigation -->
  <div class="sidebar-menu">
    <div class="sidebar-menu-fixed">
      Menu Items Here
    </div>
  </div>
</nav>

Customize the sidebar when the navbar is used

When we use the navbar, we extend the class called wrapper

NavbarClass
unusedwrapper
Usedwrapper-navbar-used
Used (fixed)wrapper-navbar-fixed

Other class

Optional classes as needed.

DescriptionClass
The right top rounded in the sidebarsidebar-rounded-top-right
Fixed menu in the sidebarsidebar-menu-fixed

jQuery toggle

If you would like to have your own toggle button visible at all resolutions, we need to change the class in sidebar.js

DescriptionClass
Visible in small devicessidebar-toggle
Visible all resolutionssidebar-toggle-visible

Responsive Sidebar Navigation Skeleton With Bootstrap, Sidebar skeleton Plugin/Github, collapse side panel bootstrap 4


See Demo And Download

Official Website(compostrap): Click Here

This superior jQuery/javascript plugin is developed by compostrap. For extra Advanced usage, please go to the official website.

Share

You may also like...

Leave a Reply

Your email address will not be published.