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
| Part | File | Does |
|---|---|---|
| NavigationMenu | NavigationMenu.vue | Groups all parts of the navigation menu. |
| NavigationMenuContent | NavigationMenuContent.vue | Holds the links and content shown when its menu item is open. |
| NavigationMenuIndicator | NavigationMenuIndicator.vue | Points to the trigger of the currently open navigation menu item. |
| NavigationMenuItem | NavigationMenuItem.vue | Groups a trigger with the content it opens, or holds a single link. |
| NavigationMenuLink | NavigationMenuLink.vue | Links to a page from the navigation menu. |
| NavigationMenuList | NavigationMenuList.vue | Lists the top-level items of the navigation menu. |
| NavigationMenuTrigger | NavigationMenuTrigger.vue | Opens and closes the content of its navigation menu item. |
| NavigationMenuViewport | NavigationMenuViewport.vue | Shows 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
Groups all parts of the navigation menu. Renders a <nav>.
Props 14
| Prop | Type | Default | |
|---|---|---|---|
| modelValue | string | — | |
| |||
| defaultValue | string | — | |
| |||
| dir | Direction | — | |
| |||
| orientation | Orientation | 'horizontal' | |
| |||
| delayDuration | number | 200 | |
| |||
| skipDelayDuration | number | 300 | |
| |||
| disableClickTrigger | boolean | false | |
| |||
| disableHoverTrigger | boolean | false | |
| |||
| disablePointerLeaveClose | boolean | false | |
| |||
| unmountOnHide | boolean | true | |
| |||
| asChild | boolean | false | |
| |||
| as | AsTag | Component | 'nav' | |
| |||
| class | ClassValue | — | |
| |||
| viewport | boolean | true | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:modelValue | value: string | |
| ||
Slots 1
| Slot | Slot props | |
|---|---|---|
| default | { modelValue: string; } | |
| ||
Data attributes 1
| Data attribute | Values | |
|---|---|---|
| data-viewport | — | |
| ||