Skip to Content
Liquid Glass UI
Components

DropdownMenu

Responsive Apple Liquid Glass dropdown menu displaying a floating macOS 27 Liquid Glass menu with #0069F9 highlights on desktop, and automatically adapting to a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer with submenu drill-down on mobile.

Fully compatible with the standard shadcn/ui JSX API (<DropdownMenu> / <DropdownMenuTrigger> / <DropdownMenuContent> / <DropdownMenuGroup> / <DropdownMenuItem> / <DropdownMenuCheckboxItem> / <DropdownMenuRadioGroup> / <DropdownMenuSub>), adapting automatically via useIsMobile() (768px):

  • Desktop (>= 768px · macOS 27): Powered by @base-ui/react/menu, opening a floating 14px-radius Liquid Glass menu with compact 28px rows, #0069F9 hover highlight, trailing checkmarks (✓), keyboard shortcuts, and cascading submenus.
  • Mobile (< 768px · iOS 27): Automatically switches to a 32px top-radius iOS 27 bottom Liquid Glass Drawer powered by @base-ui/react/drawer, complete with swipe-to-dismiss, top grabber handle, Inset Grouped lists, trailing Apple Blue checkmarks, and in-drawer submenu navigation with ‹ Back.

Responsive Live Preview

Includes group labels, shortcuts, nested submenus, disabled items, and destructive actions; toggle the Mobile icon top-right to explore the iOS 27 bottom Drawer and submenu navigation, or adjust the sidebar Glass Tint slider:

apple-liquid-ui/preview/dropdown-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/dropdown-menu

# Or install directly via URL
npx shadcn@latest add https://your-domain.com/r/dropdown-menu.json

Checkbox Items

Following Apple 27 menu guidelines, checkmarks align on the right so leading icons, labels, and section headings stay vertically aligned; on mobile, the Drawer stays open by default for multi-toggle convenience:

apple-liquid-ui/preview/dropdown-menu-checkboxes
MacBook · 16:10

Radio Group

Use DropdownMenuRadioGroup and DropdownMenuRadioItem for mutually exclusive selections:

apple-liquid-ui/preview/dropdown-menu-radio-group
MacBook · 16:10

Usage

import { Button } from '@/components/ui/button';
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuShortcut,
  DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';

export function Example() {
  return (
    <DropdownMenu>
      <DropdownMenuTrigger render={<Button variant="secondary">Actions</Button>} />
      <DropdownMenuContent title="File Actions" className="w-56">
        <DropdownMenuGroup>
          <DropdownMenuLabel>File</DropdownMenuLabel>
          <DropdownMenuItem>
            Rename
            <DropdownMenuShortcut>⌘E</DropdownMenuShortcut>
          </DropdownMenuItem>
          <DropdownMenuItem>
            Duplicate
            <DropdownMenuShortcut>⌘D</DropdownMenuShortcut>
          </DropdownMenuItem>
        </DropdownMenuGroup>
        <DropdownMenuSeparator />
        <DropdownMenuItem variant="destructive">
          Move to Trash
          <DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut>
        </DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}

Note: Base UI requires DropdownMenuLabel to be nested inside <DropdownMenuGroup> for proper accessibility announcements on desktop and Inset Grouped section headers on mobile.

Props API

PropTypeDefaultDescription
glassbooleantrueLiquid Glass material reacting to glass tint; false renders a 100% opaque surface
titleReact.ReactNode—Centered header title for the mobile bottom Drawer (automatically switches to submenu title with Back button)
side'top' | 'bottom' | 'left' | 'right''bottom'Desktop only: popup side relative to trigger
align'start' | 'center' | 'end''start'Desktop only: alignment along popup axis
sideOffsetnumber6Desktop only: distance in px from trigger
alignOffsetnumber0Desktop only: offset in px along alignment axis
PropTypeDefaultDescription
variant'default' | 'destructive''default'destructive applies Apple Red destructive styling
insetbooleanfalseAdds leading indentation to align with icon items
closeOnClickbooleantrueAutomatically close menu / Drawer on click
disabledbooleanfalseDisable item interaction
PropTypeDefaultDescription
side'top' | 'bottom' | 'left' | 'right''right'Desktop only: submenu side (mobile uses in-Drawer view stack)
sideOffsetnumber4Desktop only: distance in px from parent menu

Language & Text

DropdownMenu 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.dropdownMenu 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<DropdownMenuMessages>Text overrides, merged over the built-in text and the global messages.dropdownMenu
KeyBuilt-in text (English)
backBack
titleMenu

On this page