Skip to content

Navigation Menu

A collection of links for navigating websites.

Examples

Default

vue
<NavigationMenu>
  <NavigationMenuList>
    <NavigationMenuItem>
      <NavigationMenuTrigger>Item One</NavigationMenuTrigger>
      <NavigationMenuContent>
        <ul class="grid gap-3 p-6 w-100">
          <li class="row-span-3">
            <NavigationMenuLink class="flex h-full w-full select-none flex-col justify-end rounded-md bg-linear-to-b from-muted to-muted/50 p-6 no-underline outline-none focus:shadow-md">
              <div class="mb-2 mt-4 text-lg font-medium">Link Title</div>
              <p class="text-sm leading-tight text-muted-foreground">Link description goes here.</p>
            </NavigationMenuLink>
          </li>
          <li>
            <NavigationMenuLink class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground">
              <div class="text-sm font-medium leading-none">Link Two</div>
              <p class="line-clamp-2 text-sm leading-snug text-muted-foreground">Description for link two.</p>
            </NavigationMenuLink>
          </li>
        </ul>
      </NavigationMenuContent>
    </NavigationMenuItem>
  </NavigationMenuList>
</NavigationMenu>

Props

PropTypeDefaultDescription
model-valuestring-The value of the currently selected menu item
delay-durationnumber200The duration in ms before opening a submenu
skip-delay-durationnumber300The duration in ms before skipping the delay
dirstring'ltr'The reading direction of the menu
orientationstring'horizontal'The orientation of the menu
PropTypeDefaultDescription
asstring'a'The component to render as
activebooleanfalseWhether the link is active

Slots

SlotDescription
defaultThe content of the navigation menu
viewportThe viewport slot (optional)
SlotDescription
defaultThe link content
SlotDescription
defaultThe content of the menu item.
SlotDescription
defaultThe content of the trigger.