Skip to content

Navigation - AvNavigation

✨ Introduction

The AvNavigation is the main navigation therefore the central navigation system within a site. It guides the user through the site main and secondary sections.

🏗️ Structure

The navigation component can be used to create a navigation bar with different types of navigation items:

  • direct link
  • submenu

🏷️ Props

NameTypeDefaultMandatoryDescription
idstringnav-${crypto.randomUUID()}The unique identifier for the navigation element.
labelstring'Menu principal'The aria-label for the navigation element.
navItems(NavigationMenuLinkProps | NavigationMenuProps)[]List of navigation items. Each item can be:
• A direct navigation link (NavigationMenuLinkProps) with the to and text props.
• A navigation submenu (NavigationMenuProps) with the title, links and active props.
NameTypeDefaultMandatoryDescription
idstringmenu-link-${crypto.randomUUID()}The unique identifier for the navigation menu link.
activeIdstringThe active identifier for the navigation menu link (used for external links).
tostring | RouteLocationRaw'#'The target route or URL.
highlightbooleanForces the link to appear active (aria-current="page") regardless of route matching. Useful when the link should highlight on a sub-route but to always points to a base route.
textstring''The text displayed for the link.
iconstringThe icon name (Iconify convention).
onClick($event: MouseEvent) => voidOptional click event handler.

🔊 Events

None.

🎨 Slots

None.

🚀 Storybook demos

You can find examples of use and demo of the component on its dedicated Storybook page.

💡 Examples of use

vue
<template>
  <AvNavigation :nav-items="navItems" />
</template>