# Navigation Menu

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/navigation-menu
- **Markdown:** https://refast.fastapicloud.dev/docs/components/navigation-menu.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/navigation/navigation_menu.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

A horizontal (or vertical) navigation bar with dropdown content panels.
Follows WAI-ARIA patterns for accessible navigation menus.

```python
from refast.components import (
    NavigationMenu, NavigationMenuList, NavigationMenuItem,
    NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink,
)
```

```python
NavigationMenu(
    orientation="horizontal",
    children=[
        NavigationMenuList(
            children=[
                NavigationMenuItem(
                    children=[
                        NavigationMenuTrigger("Getting Started"),
                        NavigationMenuContent(
                            children=[...],
                        ),
                    ]
                ),
            ]
        )
    ]
)
```

## Props

### `NavigationMenu`

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Menu axis |
| `children` | `ChildrenType` | `None` | `NavigationMenuList` children |

### `NavigationMenuLink`

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `label` | `str` | *(required)* | Link text |
| `href` | `str` | `"#"` | Navigation URL |
| `active` | `bool` | `False` | Mark as current page |
| `on_click` | `Callback \| None` | `None` | Click callback |

## Component Hierarchy

```
NavigationMenu
└── NavigationMenuList
    ├── NavigationMenuItem
    │   ├── NavigationMenuTrigger  ← opens dropdown
    │   └── NavigationMenuContent  ← dropdown panel
    └── NavigationMenuItem
        └── NavigationMenuLink    ← simple link (no dropdown)
```

## Example — Link-Only Item

```python
NavigationMenuItem(
    children=[
        NavigationMenuLink("About", href="/about")
    ]
)
```

## Example — With Dropdown Panel

```python
NavigationMenuItem(
    children=[
        NavigationMenuTrigger("Products"),
        NavigationMenuContent(
            class_name="p-4 w-64",
            children=[
                NavigationMenuLink("Analytics", href="/products/analytics"),
                NavigationMenuLink("Automation", href="/products/automation"),
            ]
        ),
    ]
)
```

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
