Represents a level of mobile navigation.

Example

The image below shows a level of navigation.

Image displaying a single level of navigation showing a back button, Explore A.1 above two child links, A.1.1 and A.1.2

The javascript object representing this level of navigation would be:

const navigationLevel = {
parent: {
id: 123,
label: 'Back',
path: '/a',
langcode: 'en',
hasChildren: true,
},
id: 124,
label: 'Explore A.1',
path: '/a/1',
langcode: 'en',
hasChildren: true,
items: [
{
id: 130,
label: 'A.1.1',
path: '/a/1/1',
langcode: 'en',
hasChildren: true,
},
{
id: 131,
label: 'A.1.2',
path: '/a/1/2',
langcode: 'en',
hasChildren: false,
},
],
};
interface MobileMenuData {
    hasChildren: boolean;
    id: string | number;
    items: MobileMenuItem[];
    label: string;
    langcode: string;
    parent: null | MobileMenuItem;
    path: string;
}

Hierarchy (view full)

Properties

hasChildren: boolean

Indicator noting this menu item has children and therefore should open a new level of navigation. *

id: string | number

The ID of the menu item *

Array of navigation items to display.

label: string

Text label used for display *

langcode: string

The 2 character language code. *

parent: null | MobileMenuItem

Parent navigation item. This can be null if you are showing the top level of navigation.

path: string

URL to the navigation item *

Generated using TypeDoc