Elements:Navs
This page shows the various navigation components included within the theme which can be used anywhere on the site including tabs, pills, inline navs, breadcrumbs & pagination links.
Base Nav
All Bootstrap navs follow a similar structure:
-
The wrapper uses a base class
.nav
which can either be applied to anul
element ornav
ordiv
elements. -
The navigation item uses the class
.nav-item
and is applied to theli
elements within list navigations. -
The navigation link uses the class
.nav-link
and is applied to thea
elements within list navigations.
Active states are set on the
.nav-link
element by adding the class
.active
.
Disabled states are set on the
.nav-link
element by adding the class
.disabled
.
List navigation
Nav with links navigation
Alignment
You can use the flexbox utilities to align the alignment of navigation items.
Center
.justify-content-center
Right
.justify-content-end
Tabs
Add the class
.nav-tabs
to the wrapper to force all items to display horizontally in a tab style.
Tabs can use static links or implement tabbable Javascript based tabs, see Tabbable Tabs & Pills.
Default
Vertical Tabs
Add the class
.flex-column
to the wrapper to stack items vertically.
Underline
Pills
Default
Vertical Pills
Add the class
.flex-column
to the wrapper to stack items vertically.
Tabs & pills with dropdowns
By using a list structure you can include dropdown menus within the tabs or pills:
-
Add a
.dropdown
class to you.nav-item
element. -
Then add a
.dropdown-toggle
class &data-bs-toggle="dropdown"
attribute to your.nav-link
element. -
Include your structured
.dropdown-menu
after your.nav-link
element.
Tabs
Pills
Fill and justify navs
To force nav items to fill the available horizontal space you can use the
.nav-fill
and
.nav-justified
. They work the same minus
.nav-justified
will force all nav items to be the same width.
Nav Fill
Nav Justified
Sidebar/Section Menus
Left Side
Right Side
Accordion Sidebar/Section Menus
Left Side
Right Side
Breadcrumbs
Breadcrumb styling can be applied to
ul
lists or to links within a wrapper element with the
.breadcrumb
class, each item within must have the
.breadcrumb-item
class.
.active
class is used to indicate the active breadcrumb item.
List examples
Links & nav examples
Pagination
Pagination uses a list structure with a
.pagination
class on the
ul
element and then
.page-item
on
li
elements and
.page-link
on any link elements.