Compact Menu

Description

Default vertical menu is full width. You may want change that behavior and make the menu compact at page level or at template level. You can experience compact menu in left side menu.

CSS Classes

This table contains all classes related to the vertical fixed navigation option.

All these options can be set via following classes:

Classes Description
.menu-collapsed To create vertical compact menu, you need to add .menu-collapsed class in <body> tag. Refer HTML markup line no 4.

HTML Markup

This section contains HTML Markup to create vertical compact menu. It define where to add css classes to make vertical compact menu.

  • Line no 4: Contain the .menu-collapsed class to set vertical compact menu.
                  
                      <!DOCTYPE html>
                        <html lang="en">
                          <head></head>
                          <body data-menu="vertical-menu" class="vertical-layout vertical-menu 2-column menu-collapsed">

                            <!-- 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 Navigation-->
                            <div class="main-menu menu-dark menu-fixed menu-shadow">
                                ...
                            </div>
                            <!-- END 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>
                  
                

Page Level Compact Menu

This section contains JavaScript code to enable compact menu at page level only. You must include following js code in a custom javascript file and must include on that page only where compact menu is required.

                    
                        $.app.menu.collapse();
                    
                

Template Level Compact Menu

This section contains JavaScript code to enable compact menu at template level. You must set the compactMenu variable to "true" in the app.js file found at this page "app-assets/js/core/app.js". We have already added that code in app.js file where you can just change false to true.

                    
                        var compactMenu = true;
                    
                

Theme Customizer


Customize & Preview in Real Time

Layout Options

Navigation Color Options
Solid
Gradient

Solid

Gradient


Menu Color Options
Buy Now