navigation-menu

Navigation Menu

A row of site links where some open a panel of further links, shown in one shared panel below the row that resizes to each; set viewport to false to open each panel under its own trigger. For full-width flyouts with image tiles, use mega-menu.

Parts

PartFileDoes
NavigationMenuNavigationMenu.vueGroups all parts of the navigation menu.
NavigationMenuContentNavigationMenuContent.vueHolds the links and content shown when its menu item is open.
NavigationMenuIndicatorNavigationMenuIndicator.vuePoints to the trigger of the currently open navigation menu item.
NavigationMenuItemNavigationMenuItem.vueGroups a trigger with the content it opens, or holds a single link.
NavigationMenuLinkNavigationMenuLink.vueLinks to a page from the navigation menu.
NavigationMenuListNavigationMenuList.vueLists the top-level items of the navigation menu.
NavigationMenuTriggerNavigationMenuTrigger.vueOpens and closes the content of its navigation menu item.
NavigationMenuViewportNavigationMenuViewport.vueShows the content of the open navigation menu item.

Anatomy

<NavigationMenu>
  <NavigationMenuList>
    <NavigationMenuItem>
      <NavigationMenuTrigger />
      <NavigationMenuContent>
        <NavigationMenuLink />
      </NavigationMenuContent>
      <NavigationMenuLink />
    </NavigationMenuItem>
    <NavigationMenuIndicator />
  </NavigationMenuList>
</NavigationMenu>

Styling

All of Navigation Menu’s styles live in navigation-menu.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core
class-variance-authority
reka-ui

API reference

Navigation Menu
State