Skip to content
On this page

Navigation Menu ​

On this page, you'll learn how to add mobile and desktop navigation items.

Starting ​

The configuration of the navigation menus can be found in the ./src/constants/menu directory inside the topMenu.tsx and mobileMenu.tsx files.

  1. Mobile Menu: mobileMenu.tsx
  2. Desktop Top Menu: topMenu.tsx

Insert a new navigation item into the return array:

typescript
return [
  {
    key: 'home',
    icon: <AiFillHome color="#F12C4C" size={22} />,
    label: 'header.tabs.home',
    path: paths.home,
  },
]

Props:

NameRequiredTypeDescription
keytruestringUnique key to identify the item
iconfalseJSX.ElementIcon that will appear on the left side
labeltruestringMenu text with translation id
pathfalsestringRoute URL or link text
submenufalseNavMenu[]Array of nav items that will be part of the submenu
typefalsestringType of item separator, group
onClickfalsefunctiononClick function that receives the MenuInfo parameter