title: Making a Collapsible Sidebar Nav in Bootstrap 4?
body: <p>I am wondering if someone can help me get started on how I could create a sidebar nav like on <a href="https://pixinvent.com/stack-responsive-bootstrap-4-admin-template/html/ltr/vertical-modern-menu-template/" rel="nofollow noreferrer">this template</a>. I was thinking of buying the template and going through the code that way but I think it comes with a ton of stuff that might just confuse me.</p>
  
  <p>I am trying to understand how make it so on a large screen you will see</p>
  
  <p><a href="https://i.stack.imgur.com/DjCPo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DjCPo.png" alt="enter image description here"></a></p>
  
  <p>or</p>
  
  <p><a href="https://i.stack.imgur.com/H816y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H816y.png" alt="enter image description here"></a></p>
  
  <p>but on mobile you will see the hamburger menu</p>
  
  <p><a href="https://i.stack.imgur.com/JJ3vz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JJ3vz.png" alt="enter image description here"></a></p>
  
  <p>So far I got this</p>
  
  <pre><code>&lt;div class="container-fluid h-100"&gt;
      &lt;div class="row h-100"&gt;
          &lt;div class="col-2 collapse d-md-flex bg-light pt-2 h-100" id="sidebar"&gt;
              &lt;ul class="nav flex-column flex-nowrap"&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;
                          &lt;i class="fas fa-cog"&gt;&lt;/i&gt;
                          &lt;span class="badge badge-dark"&gt;4&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Analytics&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Export&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;div class="col pt-2"&gt;
              &lt;div class="row w-100"&gt;
                  &lt;div class="col-12 pt-2" style="background:coral;"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row w-100"&gt;
                  fakdfkaf
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>