Skip to main content

Menu Classes

We provide a comprehensive set of classes for different menu types including vertical and horizontal menus. These classes are designed to assist in customizing the menu of your application. You can find these classes in the src/@menu/utils/menuClasses.ts file. You can also create and use your own custom classes for more specific menu needs.

List of classes

Common Classes

Variable NameClass Name
rootts-menu-root
menuSectionRootts-menusection-root
menuItemRootts-menuitem-root
subMenuRootts-submenu-root
buttonts-menu-button
prefixts-menu-prefix
suffixts-menu-suffix
labelts-menu-label
iconts-menu-icon
menuSectionWrapperts-menu-section-wrapper
menuSectionContentts-menu-section-content
menuSectionLabelts-menu-section-label
subMenuContentts-submenu-content
subMenuExpandIconts-submenu-expand-icon
openActivets-open-active
disabledts-disabled
activets-active
opents-open

Vertical Menu Classes

Variable NameClass Name
rootts-vertical-nav-root
containerts-vertical-nav-container
bgColorContainerts-vertical-nav-bg-color-container
headerts-vertical-nav-header
imagets-vertical-nav-image
backdropts-vertical-nav-backdrop
collapsedts-collapsed
toggledts-toggled
hoveredts-hovered
scrollWithContentts-scroll-with-content
breakpointReachedts-breakpoint-reached
collapsingts-collapsing
expandingts-expanding

Horizontal Menu Classes

Variable NameClass Name
rootts-horizontal-nav-root
scrollWithContentts-scroll-with-content
breakpointReachedts-breakpoint-reached

How to create your custom classes?

To create your own custom menu classes, start by making a new file (say, src/utils/userMenuClasses.ts). You can use src/@menu/utils/menuClasses.ts file as a reference. Here's a pattern you can follow in your custom file:

src/utils/userMenuClasses.ts
export const verticalNavClasses = {
customClass: 'custom-menu-class'
}

You may copy the code from the src/@menu/utils/menuClasses.ts file and paste it in the newly created file. Then, you can add your custom classes to the objects.

How to use your custom classes?

You need to import the custom classes in the file where you want to use them in the following way:

import { verticalNavClasses } from 'src/utils/userMenuClasses'

<Menu className={verticalNavClasses.customClass}>
...
</Menu>

That's it!