NavList
This component is mainly used in conjunction with wrap/eject in Custom Theme , and is different from components that are directly imported in MDX. You can modify the styles and functions by passing component props or directly overriding the component. If you override the entire component through eject, please note that the reading of the corresponding configuration options of the component will become invalid and you need to control it yourself.
NavList renders a list of custom navigation items using the layout's current navigation presentation. The same component works in the desktop navbar and the expanded mobile menu.
Usage
Use NavList with one of the navigation item slots in a custom theme:
On desktop, the items are rendered in the navbar. On small screens, the same items are rendered in the expanded mobile menu, so the theme does not need separate desktop and mobile implementations.
Props
items
- Type:
NavItem[]
Navigation items to render. The item shape is the same as themeConfig.nav, including text, link, and nested items.
Placement
Pass NavList to one of the four navigation item slots on Layout:
beforeLeftNavItemsafterLeftNavItemsbeforeRightNavItemsafterRightNavItems
The slot determines whether the list appears before or after the corresponding left or right navigation items.