<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-primary mb-4">
<div class="container position-relative">
<a class="navbar-brand mr-lg-5" href="#">
<img class="navbar-brand-dark" src="../../assets/img/brand/light.svg" alt="menuimage">
<img class="navbar-brand-light" src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
<div class="navbar-collapse collapse" id="navbar-default-primary">
<div class="navbar-collapse-header">
<div class="row">
<div class="col-6 collapse-brand">
<a href="#">
<img src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
</div>
<div class="col-6 collapse-close">
<i class="fas fa-times" data-toggle="collapse" role="button"
data-target="#navbar-default-primary" aria-controls="navbar-default-primary"
aria-expanded="false" aria-label="Toggle navigation"></i>
</div>
</div>
</div>
<ul class="navbar-nav navbar-nav-hover align-items-lg-center">
<li class="nav-item dropdown">
<a href="#" class="nav-link" data-toggle="dropdown" role="button">
<i class="fas fa-angle-down nav-link-arrow"></i>
<span class="nav-link-inner-text">Dropdown 1</span>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Dropdown
item 1</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 2</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 3</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link" data-toggle="dropdown" role="button">
<i class="fas fa-angle-down nav-link-arrow"></i>
<span class="nav-link-inner-text">Dropdown 2 </span>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Dropdown
item 1</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 2</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 3</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link" data-toggle="dropdown" role="button">
<i class="fas fa-angle-down nav-link-arrow"></i>
<span class="nav-link-inner-text">Dropdown 3</span>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Dropdown
item 1</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 2</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 3</a></li>
</ul>
</li>
</ul>
</div>
<div class="d-flex align-items-center">
<p class="text-white mb-0">Primary navbar</p>
<button class="navbar-toggler ml-2" type="button" data-toggle="collapse"
data-target="#navbar-default-primary" aria-controls="navbar-default-primary"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</nav>
We've made sure that you can change the colors of the navbar very easily. All you have
to do is add the modifier class .navbar-theme-*
(eg.
.navbar-theme-primary, .navbar-theme-secondary, .navbar-theme-danger, .navbar-theme-dark
)
in order to change the colors. As you can see, even the dropdown item hover effect will
change their
color.
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-primary mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-secondary mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-tertiary mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-dark mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-light navbar-theme-light mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-primary mb-4">
<div class="container position-relative">
<a class="navbar-brand mr-lg-5" href="#">
<img class="navbar-brand-dark" src="../../assets/img/brand/light.svg" alt="menuimage">
<img class="navbar-brand-light" src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
<div class="navbar-collapse collapse" id="navbar-submenu-primary">
<div class="navbar-collapse-header">
<div class="row">
<div class="col-6 collapse-brand">
<a href="#">
<img src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
</div>
<div class="col-6 collapse-close">
<i class="fas fa-times" data-toggle="collapse" role="button"
data-target="#navbar-submenu-primary" aria-controls="avbar-submenu-primary"
aria-expanded="false" aria-label="Toggle navigation"></i>
</div>
</div>
</div>
<ul class="navbar-nav navbar-nav-hover align-items-lg-center">
<li class="nav-item dropdown">
<a href="#" class="nav-link" data-toggle="dropdown" role="button">
<i class="fas fa-angle-down nav-link-arrow"></i>
<span class="nav-link-inner-text">Dropdown</span>
</a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle dropdown-item d-flex justify-content-between align-items-center"
aria-haspopup="true" aria-expanded="false">Submenu 1<i
class="fas fa-angle-right nav-link-arrow"></i></a>
<ul class="dropdown-menu">
<li>
<a href="#" class="dropdown-item">Submenu
item 1</a>
<a href="#" class="dropdown-item">Submenu
item 2</a>
<a href="#" class="dropdown-item">Submenu
item 3</a>
</li>
</ul>
</li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle dropdown-item d-flex justify-content-between align-items-center"
aria-haspopup="true" aria-expanded="false">Submenu 2<i
class="fas fa-angle-right nav-link-arrow"></i></a>
<ul class="dropdown-menu">
<li>
<a href="#" class="dropdown-item">Submenu
item 1</a>
<a href="#" class="dropdown-item">Submenu
item 2</a>
<a href="#" class="dropdown-item">Submenu
item 3</a>
</li>
</ul>
</li>
<li><a class="dropdown-item" href="#">Dropdown
item 1</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 2</a></li>
<li><a class="dropdown-item" href="#">Dropdown
item 3</a></li>
</ul>
</li>
</ul>
</div>
<div class="d-flex align-items-center">
<p class="text-white mb-0">Submenu navbar</p>
<button class="navbar-toggler ml-2" type="button" data-toggle="collapse"
data-target="#navbar-submenu-primary" aria-controls="avbar-submenu-primary"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-secondary mb-4">
<div class="container position-relative">
<a class="navbar-brand mr-lg-5" href="#">
<img class="navbar-brand-dark" src="../../assets/img/brand/light.svg" alt="menuimage">
<img class="navbar-brand-light" src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
<div class="navbar-collapse collapse" id="navbar-megamenu-secondary">
<div class="navbar-collapse-header">
<div class="row">
<div class="col-6 collapse-brand">
<a href="#">
<img src="../../assets/img/brand/dark.svg" alt="menuimage">
</a>
</div>
<div class="col-6 collapse-close">
<i class="fas fa-times" data-toggle="collapse" role="button"
data-target="#navbar-megamenu-secondary" aria-controls="navbar-megamenu-secondary"
aria-expanded="false" aria-label="Toggle navigation"></i>
</div>
</div>
</div>
<ul class="navbar-nav navbar-nav-hover align-items-lg-center">
<li class="nav-item dropdown mega-dropdown">
<a href="#" class="nav-link" data-toggle="dropdown" role="button">
<i class="fas fa-angle-down nav-link-arrow"></i>
<span class="nav-link-inner-text">Mega menu</span>
</a>
<div class="dropdown-menu">
<div class="row">
<div class="col-lg-6 inside-bg d-none d-lg-block">
<div class="bg-img d-flex align-items-center overlay-dark bg-tertiary text-white overflow-hidden"
data-background="../../assets/img/megamenu_bg.jpg">
<div class="z-2">
<h4 class="text-white">Components</h4>
<p class="lead">These pages demonstrates components
functionality.See
Documentation
for a detailed technical explanation.</p>
<a href="../../docs/introduction.html" target="_blank"
class="btn btn-secondary btn-icon animate-up-2 mb-3 mb-sm-0">
<span class="btn-inner-icon"><i class="fas fa-book"></i></span>
<span class="btn-inner-text">Documentation</span>
</a>
</div>
</div>
</div>
<div class="col pl-0">
<ul class="list-style-none">
<li><a class="dropdown-item" href="../../html/components/accordions.html">Accordions</a></li>
<li><a class="dropdown-item" href="../../html/components/alerts.html">Alerts</a></li>
<li><a class="dropdown-item" href="../../html/components/badges.html">Badges</a></li>
<li><a class="dropdown-item" href="../../html/components/blog-cards.html">Blog
Cards</a></li>
<li><a class="dropdown-item" href="../../html/components/bootstrap-carousels.html">Bootstrap
Carousels</a></li>
<li><a class="dropdown-item" href="../../html/components/breadcrumbs.html">Breadcrumbs</a></li>
<li><a class="dropdown-item" href="../../html/components/buttons.html">Buttons</a></li>
<li><a class="dropdown-item" href="../../html/components/counters.html">Counters</a></li>
<li><a class="dropdown-item" href="../../html/components/dropdowns.html">Dropdowns</a></li>
<li><a class="dropdown-item" href="../../html/components/forms.html">Forms</a></li>
</ul>
</div>
<div class="col pl-0">
<ul class="list-style-none">
<li><a class="dropdown-item" href="../../html/components/icon-boxes.html">Icon
Boxes</a></li>
<li><a class="dropdown-item" href="../../html/components/modals.html">Modals</a></li>
<li><a class="dropdown-item" href="../../html/components/navs.html">Navs</a></li>
<li><a class="dropdown-item" href="../../html/components/owl-carousels.html">Owl
Carousels</a></li>
<li><a class="dropdown-item" href="../../html/components/pagination.html">Pagination</a></li>
<li><a class="dropdown-item" href="../../html/components/popovers.html">Popovers</a></li>
<li><a class="dropdown-item" href="../../html/components/pricing-cards.html">Pricing
Cards</a></li>
<li><a class="dropdown-item" href="../../html/components/profile-cards.html">Profile
Cards</a></li>
<li><a class="dropdown-item" href="../../html/components/progress-bars.html">Progress
Bars</a></li>
<li><a class="dropdown-item" href="../../html/components/steps.html">Steps</a></li>
</ul>
</div>
<div class="col pl-0">
<ul class="list-style-none">
<li><a class="dropdown-item" href="../../html/components/tables.html">Tables</a></li>
<li><a class="dropdown-item" href="../../html/components/tabs.html">Tabs</a></li>
<li><a class="dropdown-item" href="../../html/components/timelines.html">Timelines</a></li>
<li><a class="dropdown-item" href="../../html/components/tooltips.html">Tooltips</a></li>
<li><a class="dropdown-item" href="../../html/components/typography.html">Typography</a></li>
<li><a class="dropdown-item" href="../../html/components/widgets.html">Widgets</a></li>
</ul>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="d-flex align-items-center">
<p class="text-white mb-0">Submenu navbar</p>
<button class="navbar-toggler ml-2" type="button" data-toggle="collapse"
data-target="#navbar-megamenu-secondary" aria-controls="navbar-megamenu-secondary"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</nav>
<nav class="navbar navbar-expand-lg navbar-dark navbar-theme-dark mb-4">
...
</nav>
<nav class="navbar navbar-expand-lg navbar-light navbar-theme-soft mb-4">
...
</nav>
In order to enable headroom for the navbar add the class .headroom
to the main .navbar
element.
You can update the options of Headroom.js in js/leo.js
.
if ($('.headroom')[0]) {
var headroom = new Headroom(document.querySelector("#navbar-main"), {
offset: 0,
tolerance: {
up: 0,
down: 0
},
});
headroom.init();
}