Navs

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

Base nav

The base .navcomponent is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling. No active states are included in the base nav.


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 .navuses display: flex, the nav links behave the same as nav items would, but without the extra markup

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.

Centered with .justify-content-center


Right-aligned with .justify-content-end

Vertical alignment

Stack your navigation by changing the flex item direction with the .flex-columnutility. Need to stack them on some viewports but not others? Use the responsive versions (e.g., .flex-sm-column).

As always, vertical navigation is possible without <ul>s, too.

Tabs

Takes the basic nav from above and adds the .nav-tabsclass to generate a tabbed interface.


Optional Colors

Use .nav-tabsmodifier classes to change the color of the active link.

Pills

Take that same HTML, but use .nav-pillsinstead


Fill and justify

Force your .nav’scontents to extend the full available width one of two modifier classes. To proportionately fill all available space with your .nav-items, use .nav-fill. Notice that all horizontal space is occupied, but not every nav item has the same width.