- YOU ARE HERE
- UI Nav
Base nav
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="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> </li> <li class="nav-item"> <a class="nav-link disables" href="#">Disabled</a> </li> </ul>
Classes are used throughout, so your markup can be super flexible. Use <ul>
s like
above, or roll your own with say a <nav>
element. Because the .nav uses display: flex,
the nav links behave the same as nav items would, but without the extra markup.
<nav class="nav"> <a class="nav-link active" href="#">Active</a> <a class="nav-link" href="#">Link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disables" href="#">Disabled</a> </nav>
Tabs & Pills
Takes the basic nav from above and adds the .nav-tabs
class to generate a tabbed interface. Use
them to create tabbable regions with our tab JavaScript plugin.
<nav class="nav"> <a class="nav-link active" href="#">Active</a> <a class="nav-link" href="#">Link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disables" href="#">Disabled</a> </nav>
Take that same HTML, but use .nav-pills
instead:
<nav class="nav nav-pills"> <a class="nav-link active" href="#">Active</a> <a class="nav-link" href="#">Link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disables" href="#">Disabled</a> </nav>
Nav with dropdowns
Takes the basic nav from above and adds the .nav-tabs
class to generate a tabbed interface. Use
them to create tabbable regions with our tab JavaScript plugin.
<ul class="nav nav-pills"> <li class="nav-item"> <a class="nav-link active" href="#">Active</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a> <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> <div class="dropdown-item"></div> <a class="dropdown-item" href="#">Separated link</a> </div> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> </li> <li class="nav-item"> <a class="nav-link disabled" href="#">Disabled</a> <li> </ul>