Navs

Documentation and examples for how to use Bootstrap’s included navigation components. Read the Official Bootstrap Documentation for a full list of instructions and other options.


Basic Example

Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states. Swap modifier classes to switch between each style.

<ul class="nav">
  <li class="nav-item">
    <a class="nav-link active" href="#">Home</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#">About</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#">Contact</a>
  </li>
</ul>

Horizontal Alignment

Change the horizontal alignment of your nav with flexbox utilities. By default, navs are left-aligned, but you can easily change them to center or right aligned.

<ul class="nav justify-content-center">...</ul>

<ul class="nav justify-content-end">...</ul>

Vertical Nav

Stack your navigation by changing the flex item direction with the .flex-column utility.

<ul class="nav nav-pills">...</ul>

Pills

Take that same HTML, but add .nav-pills class to it. Same goes to vertical nav.

<ul class="nav flex-column">...</ul>

Fill & Justify

Force your nav’s contents to extend the full available width one of two modifier classes.

<ul class="nav nav-pills nav-fill">...</ul>

Using Dropdown

Add dropdown menu to any of the item of the nav.

<li class="nav-item">
  <a class="nav-link" href="#" data-toggle="dropdown">About <i data-feather="chevron-down" class="wd-15 ht-15"></i></a>
  <div class="dropdown-menu tx-13">
    <a href="" class="dropdown-item">Vision</a>
    <a href="" class="dropdown-item">Mission</a>
    <a href="" class="dropdown-item">Goal</a>
  </div>
</li>

Inside Dropdown

Add nav inside of dropdown menu.

<div class="dropdown">
  <a href="" class="btn btn-primary" data-toggle="dropdown">Dropdown Menu</a>

  <div class="dropdown-menu tx-13">
    <ul class="nav nav-pills flex-column">
      <li class="nav-item">
        <a class="nav-link" href="#">Home</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">About</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Contact</a>
      </li>
    </ul>
  </div>
</div>