Skip to main content

Header Menu

Renders a list of menus as either a horizontal list of NavLink components or a vertical SidebarMenu in mobile mode

Storybook Docs

Props

NameTypeDefaultDescription
menus IHeaderMenuMenu<T>[]-Array of menu objets to be rendered in vertical or horizontal lists
isMobilebooleanfalseDetermines if the menus will be displayed as a horizontal list of NavLink components (desktop) or as a vertical SidebarMenu (mobile)
navLinkComponentElementType"a"Type of Element tag used for the NavLink components

IHeaderMenuMenu

IHeaderMenuMenu has a generic T that extend of number | string and it extend of IMenuItem<T>

NameTypeDescription
childrenIHeaderMenuMenu<T>[]Object array to be rendered in a header sub-menu
urlstringthe url of the navigation link