Skip to Content
Liquid Glass UI
Components

NavigationMenu

Responsive Apple Liquid Glass floating capsule navigation bar with adaptive-size Liquid Glass popovers and directional transitions on desktop, automatically switching to an iOS 27 bottom Liquid Glass Drawer on mobile.

Built on @base-ui/react/navigation-menu and Drawer, fully compatible with the standard shadcn/ui JSX API (<NavigationMenu> / <NavigationMenuList> / <NavigationMenuItem> / <NavigationMenuTrigger> / <NavigationMenuContent> / <NavigationMenuLink>):

  • Desktop (>= 768px · macOS 27): <NavigationMenuList> renders a pill <LiquidSurfaceBackdrop /> bar; switching between triggers smoothly morphs the 22px-radius popover dimensions and animates content directionally.
  • Mobile (< 768px · iOS 27): Tapping <NavigationMenuTrigger> opens a 32px top-radius bottom Liquid Glass Drawer with centered trigger title and swipe-to-dismiss; direct <NavigationMenuLink> items keep lightweight capsule taps.

Responsive Live Preview

Hover or click desktop triggers to experience smooth viewport morphing; switch to the Mobile icon top-right and tap triggers to preview the iOS 27 bottom Liquid Glass Drawer:

apple-liquid-ui/preview/navigation-menu-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

# Install via the configured @apple-liquid namespace (includes drawer, liquid-surface, use-mobile, and liquid-glass)
npx shadcn@latest add @apple-liquid/navigation-menu

Active State Highlight

Mark the current page with active for a constant soft Apple Blue pill highlight:

apple-liquid-ui/preview/navigation-menu-compact
MacBook · 16:10

Usage

import {
  NavigationMenu,
  NavigationMenuContent,
  NavigationMenuItem,
  NavigationMenuLink,
  NavigationMenuList,
  NavigationMenuTrigger,
  navigationMenuTriggerStyle,
} from '@/components/ui/navigation-menu';

export function Example() {
  return (
    <NavigationMenu>
      <NavigationMenuList>
        <NavigationMenuItem>
          <NavigationMenuTrigger>Guidelines</NavigationMenuTrigger>
          <NavigationMenuContent>
            <div className="grid w-80 gap-2">
              <NavigationMenuLink href="/docs">
                <div className="font-semibold">Quick Start</div>
                <p className="text-xs text-muted-foreground">
                  Explore Apple Liquid Glass materials and installation.
                </p>
              </NavigationMenuLink>
            </div>
          </NavigationMenuContent>
        </NavigationMenuItem>
        <NavigationMenuItem>
          <NavigationMenuLink href="/docs/components" className={navigationMenuTriggerStyle()}>
            Components
          </NavigationMenuLink>
        </NavigationMenuItem>
      </NavigationMenuList>
    </NavigationMenu>
  );
}

Props API

PropTypeDefaultDescription
glassbooleantrueLiquid Glass material reacting to glass tint; false renders a 100% opaque surface
align'start' | 'center' | 'end''start'Desktop popover alignment relative to trigger (centered on mobile)
delaynumber50Hover open delay in ms
closeDelaynumber50Hover close delay in ms
PropTypeDefaultDescription
activebooleanfalseMarks the active page with a constant Apple Blue capsule highlight
closeOnClickbooleanfalseAutomatically close the popover upon clicking the link

Language & Text

NavigationMenu accepts locale and messages, which apply to all of its parts and the overlays it opens and win over the global <LiquidGlassProvider locale messages>. To override the text globally, put it under messages.navigationMenu on the provider. See Liquid Glass → Global settings.

PropTypeDescription
localeLiquidGlassLocaleInputUI language of this component (any BCP 47 tag; unsupported ones fall back to English)
messagesPartial<NavigationMenuMessages>Text overrides, merged over the built-in text and the global messages.navigationMenu
KeyBuilt-in text (English)
titleNavigation menu

On this page