Modern Admin provides flexible horizontal navigation component, which allows you to modify navigation colors, appearance of different types of content, components placement etc. This page contain all navigation styling options.
All this functionality is available by setting proper classes to the horizontal navigation components and navigation itself. Below table contain all available classes that can be used with the navigation:
All these options can be set via following classes:
Classes | Description |
---|---|
.navbar-fixed |
To create horizontal fixed navigation, you need to add .navbar-fixed class in navigation <div> tag. Fore more information please check horizontal-fixed-navigation.html |
.navbar-flipped |
To create horizontal flipped navigation, you need to add .navbar-flipped class in navigation <div> tag. Fore more information please check horizontal-flipped-navigation.html |
.navbar-light |
To create light horizontal navigation, you need to add .navbar-light class in navigation <div> tag. Fore more information please check horizontal-light-navigation.html |
.navbar-dark |
To create dark horizontal navigation, you need to add .navbar-dark class in navigation <div> tag. Fore more information please check horizontal-dark-navigation.html |
.navbar-without-dd-arrow |
To remove the horizontal navigation dropdown arrow, you need to add .navbar-without-dd-arrow class in navigation <div> tag. This navigation class is optional. Fore more information please check horizontal-no-arrow-navigation.html |
.navbar-icon-right |
To create horizontal navigation with right side icons, you need to add .navbar-icon-right class in navigation <div> tag. This navigation class is optional. Fore more information please check horizontal-navigation-right-side-icons.html |
.navbar-border |
Add horizontal navigation border bottom by adding .navbar-border class in navbar <nav> tag. This navigation class is optional. |
.navbar-shadow |
Add horizontal navigation shadow by adding .navbar-shadow class in navbar <nav> tag. This navigation class is optional. |
.disabled |
To disabled horizontal navigation menu link, you need to add .disabled class in navigation <li> tag. This navigation class is optional. Fore more information please check horizontal-disabled-navigation-link.html |
This section contains HTML Markup to demonstrate horizontal navigation styling options. This markup define where to add css classes to customize navigation as per your requirements.
.navbar-fixed
class to set navigation position fixed, here you can use any one class from .navbar-fixed
& .navbar-static
..navbar-dark
class to set navigation color dark, here you can use any one class from .navbar-light
& .navbar-dark
..navbar-icon-right
, .navbar-border
& .navbar-shadow
are optional and cab be used on your custom requirements.
<!DOCTYPE html>
<html lang="en">
<head></head>
<body data-menu="vertical-menu" class="vertical-layout vertical-menu 2-column menu-expanded">
<!-- fixed-top-->
<nav role="navigation" class="header-navbar navbar-expand-sm navbar navbar-with-menu fixed-top navbar-dark navbar-shadow navbar-border">
...
</nav>
<!-- BEGIN Horizontal Navigation-->
<div role="navigation" data-menu="menu-wrapper" class="header-navbar navbar-expand-sm navbar navbar-horizontal navbar-light navbar-border navbar-without-dd-arrow"">
...
</div>
<!-- END Horizontal Navigation-->
<!-- BEGIN Content-->
<div class="content app-content">
<div class="content-wrapper">
<!-- content header-->
<div class="content-header row">
...
</div>
<!-- content header-->
<!-- content body-->
<div class="content-body">
...
</div>
<!-- content body-->
</div>
</div>
<!-- END Content-->
<!-- START FOOTER DARK-->
<footer class="footer footer-dark">
...
</footer>
<!-- START FOOTER DARK-->
</body>
</html>
Modern Admin use PUG as template engine to generate pages and whole template quickly using node js, for getting start with PUG usage & template generating process please refer template documentation.
This table contains required PUG variables to generate horizontal navigation with styling options.
Block | Variable | Datatype | Value | Description |
---|---|---|---|---|
horizontalMenuConfig |
menuType |
string |
'navbar-fixed' |
To set the horizontal navigation position fixed, use navbarCustom variable value as 'navbar-fixed' in horizontalMenuConfig block. |
horizontalMenuConfig |
menuType |
string |
'navbar-static' |
To set the horizontal navigation position static, use navbarCustom variable value as 'navbar-static' in horizontalMenuConfig block. |
horizontalMenuConfig |
menuColor |
string |
'navbar-light' |
To set the horizontal navigation color light, use navbarCustom variable value as 'navbar-light' in horizontalMenuConfig block. |
horizontalMenuConfig |
menuColor |
string |
'navbar-dark' |
To set the horizontal navigation color dark, use navbarCustom variable value as 'navbar-dark' in horizontalMenuConfig block. |
horizontalMenuConfig |
menuFlipped |
boolean |
true/false |
To set the horizontal navigation flipped, use menuFlipped variable value as true/false in horizontalMenuConfig block. |
horizontalMenuConfig |
menuIconRight |
boolean |
true/false |
To create horizontal navigation with right side icons, use menuIconRight variable value as true/false in horizontalMenuConfig block. |
horizontalMenuConfig |
menuWithoutDDArrow |
boolean |
true/false |
To remove the horizontal navigation dropdown arrow, use navbarCustom variable value as true/false in horizontalMenuConfig block. |
horizontalMenuConfig |
menuBorder |
boolean |
true/false |
To create horizontal bordered navigation, use menuBorder variable value as true/false in horizontalMenuConfig block. |
horizontalMenuConfig |
menuShadow |
boolean |
true/false |
You can also apply horizontal navigation shadow, use menuShadow variable value as true/false in horizontalMenuConfig block. |