# NavigationMenu

> A horizontal row of triggers that each open a rich, multi-column panel below the row — disclosure-pattern site navigation, not an application menu.

- Package: `fancy-ui-vue` (Vue 3.5+ + Tailwind CSS v4)
- Category: Navigation
- Tags: navigation, menu, disclosure, mega menu, dropdown, header
- Types: `NavigationMenuProps`, `NavigationMenuListProps`, `NavigationMenuItemProps`, `NavigationMenuTriggerProps`, `NavigationMenuContentProps`, `NavigationMenuLinkProps`, `NavigationMenuContext`, `NavigationMenuItemContext`
- Docs: https://fancy-ui.rama.app/docs/components/navigation-menu
- Source: https://github.com/RamaHerbin/fancy-ui/tree/main/vue/src/components/navigation-menu

## Import

```vue
<script setup lang="ts">
import { NavigationMenu } from 'fancy-ui-vue';
</script>
```

Setup (once per project): `npm install fancy-ui-vue`, then put these lines in your main CSS file (the stylesheet imports go right after `@import "tailwindcss";`):

```css
@import "tailwindcss";
@import "fancy-ui-vue/tailwind.css";
@import "fancy-ui-vue/styles.css";
```

Full guide: https://fancy-ui.rama.app/llms.txt

The names below are the ones to write in a Vue template; when one differs from the Svelte name, the Svelte name follows in parentheses. Snippets become named slots (`#default` is the default snippet), a prop the Vue port declares as a model is a `v-model:<name>` (except `ref`, exposed via `defineExpose({ ref })`: put a template ref on the component and read `.ref`) and callbacks are listeners (`onclick` is `@click`). Every component sets `inheritAttrs: false`: `class` is a declared prop, merged where the Svelte component applies it (not always the root element), and only when the props table below lists it; other attributes do not fall through unless the package README lists the component as forwarding native attributes. Divergences: https://github.com/RamaHerbin/fancy-ui/tree/main/vue#divergences-from-the-svelte-api

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `v-model:value` (Svelte `value`) | `string` | `""` | The open item's value, bindable. Empty string when every panel is closed. |
| `@value-change` (Svelte `onValueChange`) | `(value: string) => void` | — | Called whenever the open item changes, from any trigger. |
| `label` | `string` | `"Main"` | Accessible name for the nav landmark. |
| `openDelay` | `number` | `150` | Delay in ms before a hovered trigger opens its panel. |
| `closeDelay` | `number` | `200` | Delay in ms before a panel closes after the pointer leaves it and its trigger. |
| `class` | `string` | — | Additional CSS classes for the nav. |
| `ref` | `HTMLElement \| null` | `null` | Bindable reference to the nav element. |

## Slots

| Slot | Description |
| --- | --- |
| `#default` (Svelte `children`) | Typically a single NavigationMenuList. Snippet<[]> — the compound's own sub-components (NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink) are exported from the same module and used inside it. |

## Example

```vue
<script setup lang="ts">
import {
	NavigationMenu,
	NavigationMenuContent,
	NavigationMenuItem,
	NavigationMenuLink,
	NavigationMenuList,
	NavigationMenuTrigger,
} from "fancy-ui-vue";
</script>

<template>
	<NavigationMenu label="Product">
		<NavigationMenuList>
			<NavigationMenuItem value="products">
				<NavigationMenuTrigger>Products</NavigationMenuTrigger>
				<NavigationMenuContent>
					<NavigationMenuLink href="#components" class="ft-navigation-menu-feature">
						<div class="text-[13px] font-semibold">Components</div>
						<span class="text-muted-foreground text-[11px]">Browse the full UI library</span>
					</NavigationMenuLink>
					<div class="flex flex-col gap-0.5">
						<NavigationMenuLink
							href="#themes"
							title="Themes"
							description="Generate custom color palettes"
						/>
						<NavigationMenuLink
							href="#templates"
							title="Templates"
							description="Ready-to-use page starters"
						/>
					</div>
				</NavigationMenuContent>
			</NavigationMenuItem>

			<NavigationMenuItem value="resources">
				<NavigationMenuTrigger>Resources</NavigationMenuTrigger>
				<NavigationMenuContent>
					<NavigationMenuLink href="#docs" class="ft-navigation-menu-feature">
						<div class="text-[13px] font-semibold">Documentation</div>
						<span class="text-muted-foreground text-[11px]">Guides and API reference</span>
					</NavigationMenuLink>
					<div class="flex flex-col gap-0.5">
						<NavigationMenuLink
							href="#changelog"
							title="Changelog"
							description="What shipped recently"
						/>
						<NavigationMenuLink
							href="#support"
							title="Support"
							description="Get help from the community"
						/>
					</div>
				</NavigationMenuContent>
			</NavigationMenuItem>

			<li>
				<a
					href="#pricing"
					class="text-muted-foreground hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-[8px] px-[14px] py-[8px] text-[13px] font-medium no-underline transition-colors"
				>
					Pricing
				</a>
			</li>
		</NavigationMenuList>
	</NavigationMenu>
</template>
```
