Navigation Menu
stableA collection of links for navigating a website.
Basic usage
Examples
With viewport content
Add NavigationMenu.Content to display a rich link grid on hover.
Documentation navigation
NavigationMenu supports triggers, content panels, links, viewport and indicator slots.
Features
- Submenus with delay.
- Keyboard accessible.
Installation
bash
pnpm dlx structyl add navigation-menuAPI Reference
NavigationMenu.Root
Site-level navigation with submenus.
| Prop | Type | Default |
|---|---|---|
| value | stringControlled active item. | — |
| defaultValue | stringInitial active item. | — |
| onValueChange | (value: string) => voidCalled when the active item changes. | — |
| delayDuration | numberHover open delay in ms. | 200 |
| orientation | 'horizontal' | 'vertical'Layout axis. | 'horizontal' |
NavigationMenu.List
The list of top-level items.
| Prop | Type | Default |
|---|
NavigationMenu.Item
A top-level entry.
| Prop | Type | Default |
|---|---|---|
| value | stringStable identifier. | — |
NavigationMenu.Trigger
Opens an item submenu.
| Prop | Type | Default |
|---|
NavigationMenu.Content
The submenu panel.
| Prop | Type | Default |
|---|
NavigationMenu.Link
A navigable link.
| Prop | Type | Default |
|---|---|---|
| active | booleanMarks the current page. | — |