A site navigation component with dropdown content panels. Supports nested items, links, and accessible keyboard navigation.
import NavigationMenu from "@radui/ui/NavigationMenu"Docs under construction
Check back soon.
- Triggers open content panels in a shared viewport that animates between them
- Opens on hover with delays, and on Enter, Space or ArrowDown
- Arrow keys move between triggers; Escape closes the panel
- Links are plain anchors, so the menu stays crawlable and works with routers through asChild
- Horizontal or vertical orientation and collision-aware panel placement
Import all parts of the component and piece them together.
The root NavigationMenu component.
| Prop | Type | Default |
|---|---|---|
value | string | — |
loop | boolean | true |
contentLoop | boolean | true |
aria-label | string | — |
onValueChange | function | — |
delay | number | 0 |
closeDelay | number | 150 |
orientation | "horizontal" | "vertical" | "horizontal" |
onOpenChangeComplete | (open) => void | — |
actionsRef | Ref<{ close(): void }> | — |
Optional shared container for every content panel. Render it once inside Root, after the items; open panels show inside it and it sets --rad-navigation-menu-viewport-width and --rad-navigation-menu-viewport-height to the open panel's size so CSS can animate between panels.
| Prop | Type | Default |
|---|---|---|
asChild | boolean | false |
side | 'top' | 'right' | 'bottom' | 'left' | 'bottom' |
align | 'start' | 'center' | 'end' | 'center' |
sideOffset | number | 0 |
alignOffset | number | 0 |
anchor | Element | VirtualElement | RefObject | () => Element | — |
collisionAvoidance | { side?, align?, fallbackAxisSide? } | flip side, shift align |
collisionPadding | number | 5 |
collisionBoundary | Element | Element[] | — |
positionMethod | 'absolute' | 'fixed' | 'absolute' |
sticky | boolean | false |
disableAnchorTracking | boolean | false |
| Shortcut | Description |
|---|---|
| Enter | When focus is on a NavigationMenu.Trigger, toggles its content panel. |
| Space | When focus is on a NavigationMenu.Trigger, toggles its content panel. |
| ArrowRight | Moves focus to the next trigger or link, wrapping to the first when loop is enabled. |
| ArrowLeft | Moves focus to the previous trigger or link, wrapping to the last when loop is enabled. |
| ArrowDown | On a NavigationMenu.Trigger, opens its panel (if closed) and moves focus to the first link. Inside an open panel, moves focus to the next link. |
| ArrowUp | Inside an open content panel, moves focus to the previous link. |
| Home | Moves focus to the first trigger or link in the current group. |
| End | Moves focus to the last trigger or link in the current group. |
| Escape | Closes the open content panel and returns focus to its NavigationMenu.Trigger. Pressing outside the item also closes it. |
| Tab | Moves focus out of the current group to the next focusable element. With a Viewport, Tab from an open trigger enters its panel and Tab from the panel moves to the next trigger. |
| Reference | What Rad UI follows |
|---|---|
| Disclosure pattern | Root renders a <nav> landmark (name it with aria-label). Triggers are buttons that expose aria-expanded and aria-controls for their content panel; links inside panels keep native link semantics. |