Vertical Nav

Description

Modern Admin provides flexible 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.

CSS Classes

All this functionality is available by setting proper classes to the 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
.menu-fixed To create vertical fixed navigation, you need to add .menu-fixed class in navigation <div> tag. Fore more information please check vertical-fixed-navigation.html
.menu-static To create vertical static navigation, you need to add .menu-static class in navigation <div> tag. Fore more information please check vertical-static-navigation.html
.menu-light To create light vertical navigation, you need to add .menu-light class in navigation <div> tag. Fore more information please check vertical-light-navigation.html
.menu-dark To create dark vertical navigation, you need to add .menu-dark class in navigation <div> tag. Fore more information please check vertical-dark-navigation.html
.menu-accordion Default vertical navigation type is accordion navigation. To create vertical accordion navigation, you need to add .menu-accordion class in navigation <div> tag. Fore more information please check vertical-accordion-navigation.html
.menu-collapsible To create vertical collapsible navigation, you need to add .menu-collapsible class in navigation <div> tag. Fore more information please check vertical-collapsible-navigation.html
.menu-flipped Change navigation menu position to right with the help of flipped navigation menu options. You need to add .menu-flipped class in navigation <div> tag. Fore more information please check vertical-flipped-navigation.html
.menu-native-scroll To create vertical navigation with native scroll, you need to add .menu-native-scroll class in navigation <div> tag. This navigation class is optional. Fore more information please check vertical-navigation-native-scroll.html
.menu-icon-right To create vertical navigation right side icons, you need to add .menu-icon-right class in navigation <div> tag. This navigation class is optional. Fore more information please check vertical-navigation-right-side-icons.html
.menu-border To create vertical bordered navigation, you need to add .menu-border class in navigation <div> tag. This navigation class is optional. Fore more information please check vertical-bordered-navigation.html
.disabled To disabled vertical navigation menu link, you need to add .disabled class in navigation
  • tag. This navigation class is optional. Fore more information please check vertical-disabled-navigation-link.html
  • .menu-shadow You can also apply navigation shadow bottom by adding .menu-shadow class in navigation <div> tag. This navigation class is optional.

    HTML Markup

    This section contains HTML Markup to demonstrate navigation styling options. This markup define where to add css classes to customize navigation as per your requirements.

    • Line no 12 (Navigation position options): Contain the .menu-fixed class to set navigation position fixed, here you can use any one class from .menu-fixed & .menu-static.
    • Line no 12 (Navigation color options): Contain the .menu-dark class to set navigation color dark, here you can use any one class from .menu-light & .menu-dark.
    • Line no 12 (Accordion / Collapsible): Default vertical navigation type is accordion navigation. For accordion navigation .menu-accordion class is optional to use, but if you want to make navigation collapsible you need to add .menu-collapsible class.
    • Line no 12: The rest of the navigation classes like .menu-native-scroll, .menu-icon-right, .menu-border & .menu-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 navbar-with-menu fixed-top navbar-dark navbar-shadow navbar-border">
                          ...
                      </nav>
    
                      <!-- BEGIN Navigation-->
                      <div class="main-menu menu-light menu-shadow menu-border">
                          ...
                      </div>
                      <!-- END Navigation-->
    
                      <!-- BEGIN Content-->
                      <div class="content modern-content container-fluid">
                          <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>
            
            

    PUG Configuration

    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.

    PUG Variables

    This table contains required PUG variables to generate vertical navigation with styling options.

    Variable Value Description
    menuCustom 'menu-fixed' To set the navigation position fixed, use menuCustom variable value as 'menu-fixed' in menuConfig block.
    menuCustom 'menu-static' To set the navigation position static, use menuCustom variable value as 'menu-static' in menuConfig block.
    menuCustom 'menu-light' To set the navigation color light, use menuCustom variable value as 'menu-light' in menuConfig block.
    menuCustom 'menu-dark' To set the navigation color dark, use menuCustom variable value as 'menu-dark' in menuConfig block.
    menuCustom 'menu-accordion' To set the navigation accordion, use menuCustom variable value as 'menu-accordion' in menuConfig block.
    menuCustom 'menu-collapsible' To set the navigation collapsible, use menuCustom variable value as 'menu-collapsible' in menuConfig block.
    menuCustom 'menu-native-scroll' To set the native scroll bar in navigation, use menuCustom variable value as 'menu-menu-native-scroll' in menuConfig block.
    menuCustom 'menu-icon-right' To set the navigation icon on right side, use menuCustom variable value as 'menu-icon-right' in menuConfig block.
    menuCustom 'menu-border' To create vertical bordered navigation, use menuCustom variable value as 'menu-border' in menuConfig block.
    menuCustom 'menu-shadow' You can also apply navigation shadow, use menuCustom variable value as 'menu-light' in menuConfig block.
    PUG Code

    Use following PUG code to generate page or template having vertical light navigation.

    • Line no 20-21: menuConfig block has a menuCustom variable, it contains navigation specific classes shown in above PUG Configuration table.
    • Line no 32-33: content block has content section html file included include ../contents/vertical-navigation-styling.html, which can be customizable on page level.

    From the above PUG Configuration table, you can choose navigation customization variable value as per your requirement and generate template or page with the help of PUG.

                  
                      block pageVars
                        - var pageTitle    = "Navigation Styling"
                        - var pageSubTitle = "Custom navigation styling options"
                        - var description  = "The navigation styling options provides navigation customization such as color, border, shadow, position, labels & badges."
                        - var activeMenu   = "vertical-navigation-styling"
    
                      extends template
    
                      block menuConfig
                        - var menuCustom = "menu-light menu-fixed menu-shadow"
                        //- OPTIONS : menu-fixed, menu-static , menu-dark, menu-light, menu-collapsible, menu-accordion, menu-native-scroll, menu-icon-right, menu-border, menu-shadow
    
                      append breadcrumbs
                        include ../includes/mixins
                        +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Vertical Navigation"}, {name:"Navigation Styling"}])
    
                      append page-header
                        include page-headers/breadcrumb-top
    
                      //- Include page content in page block
                      append content
                        include ../contents/vertical-navigation-styling.html
    
                      //- Page specific dependency
                      //------------------------------
    
                      //- Add custom page specific CSS
                      block pagecss
    
                      //- Add custom page specific JS
                      block pagejs