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 the22px-radius popover dimensions and animates content directionally. - Mobile (
< 768px· iOS 27): Tapping<NavigationMenuTrigger>opens a32pxtop-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:
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-menuActive State Highlight
Mark the current page with active for a constant soft Apple Blue pill highlight:
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
NavigationMenu
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid 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) |
delay | number | 50 | Hover open delay in ms |
closeDelay | number | 50 | Hover close delay in ms |
NavigationMenuLink
| Prop | Type | Default | Description |
|---|---|---|---|
active | boolean | false | Marks the active page with a constant Apple Blue capsule highlight |
closeOnClick | boolean | false | Automatically 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.
| Prop | Type | Description |
|---|---|---|
locale | LiquidGlassLocaleInput | UI language of this component (any BCP 47 tag; unsupported ones fall back to English) |
messages | Partial<NavigationMenuMessages> | Text overrides, merged over the built-in text and the global messages.navigationMenu |
| Key | Built-in text (English) |
|---|---|
title | Navigation menu |
MessageScroller
Chat history scroll container that auto-pins to the latest message while preserving reading position, revealing a floating Liquid Glass Jump to Latest button when scrolled up.
Pagination
Apple 27 Button-based paginator with an accent capsule for the active page, ghost buttons for other pages, and 44px mobile ↔ 32px desktop touch targets.