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.

React
import NavigationMenu from "@radui/ui/NavigationMenu" export default () => { return ( <NavigationMenu.Root> <NavigationMenu.Item value="example"> <NavigationMenu.Trigger /> <NavigationMenu.Content> <NavigationMenu.Link href="#" /> </NavigationMenu.Content> </NavigationMenu.Item> <NavigationMenu.Viewport /> </NavigationMenu.Root> ) }

The root NavigationMenu component.

PropTypeDefault
value
string—
loop
booleantrue
contentLoop
booleantrue
aria-label
string—
onValueChange
function—
delay
number0
closeDelay
number150
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.

PropTypeDefault
asChild
booleanfalse
side
'top' | 'right' | 'bottom' | 'left''bottom'
align
'start' | 'center' | 'end''center'
sideOffset
number0
alignOffset
number0
anchor
Element | VirtualElement | RefObject | () => Element—
collisionAvoidance
{ side?, align?, fallbackAxisSide? }flip side, shift align
collisionPadding
number5
collisionBoundary
Element | Element[]—
positionMethod
'absolute' | 'fixed''absolute'
sticky
booleanfalse
disableAnchorTracking
booleanfalse
ShortcutDescription
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.

ReferenceWhat 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.