Bootstrap 5 Navbar – Show Menu Items on Large Screen

If you are working with Bootstrap 5 navbar and by default you want to show menu items in the navigation bar for all screen sizes above than lg i.e. ≥992px.

You can add following class to the nav element. navbar-expand-lg


<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Navbar</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav me-auto mb-2 mb-lg-0">
        <li class="nav-item">
          <a class="nav-link active" aria-current="page" href="#">Home</a>
        </li>
      </ul>
    </div>
  </div>
</nav>

To show navbar items on all screen greater than medium md breakpoint ≥768px , add navbar-expand-md class to the nav element.


<nav class="navbar navbar-expand-md navbar-light bg-light">

</nav>

To show navbar items on all screen greater than medium sm breakpoint ≥576px , add navbar-expand-sm class to the nav element.

Livewire Component Library

<nav class="navbar navbar-expand-sm navbar-light bg-light">

</nav>

Site Footer