Skip to main content

Installation

Or use the CLI:

Usage

Component API

The root navigation menu component built on Radix UI. Props:
  • viewport - Show viewport container (default: true)
  • orientation - Menu orientation (default: "horizontal")
  • dir - Text direction
  • value - Controlled active item value
  • onValueChange - Callback when active item changes
Container for navigation menu items. An individual navigation item. Trigger button for a menu item with content. The content shown when a menu item is active. Props:
  • All standard div props
A navigation link. Props:
  • active - Mark link as active
  • asChild - Compose with child element
Visual indicator for the active menu item. Container that displays the active menu content. Helper function to get trigger button styles for links.

Examples

Basic

A simple navigation menu:
Use with Next.js Link or other routing libraries:

With Icons

Add icons to navigation links:

Grid Layout

Display links in a grid:

Without Viewport

Disable the viewport for a simpler layout:

Vertical

Create a vertical navigation menu:

Accessibility

  • Built on Radix UI for full accessibility
  • Keyboard navigation with arrow keys and Tab
  • Focus management
  • Screen reader compatible
  • ARIA labels and roles
  • Active state indicators

API Reference

See the Base UI Navigation Menu documentation for complete API details.