Skip to Content
Liquid Glass UI
Components

Command

Responsive macOS 27 Spotlight-style Liquid Glass command palette supporting custom keyboard shortcuts on desktop, and automatically adapting to a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer with grouped rows on mobile.

Built on cmdk, <Dialog>, and <Drawer>, fully compatible with the standard shadcn/ui JSX API (<Command> / <CommandDialog> / <CommandInput> / <CommandList> / <CommandGroup> / <CommandItem> / <CommandShortcut> / <CommandSeparator>):

  • Desktop (>= 768px · macOS 27): Opens a centered Spotlight-style Liquid Glass palette via trigger or custom shortcut (such as ⌘J / Ctrl+J, ⇧⌘K), with Apple Blue (--apple-blue) item highlights and inverted shortcut keycaps.
  • Mobile (< 768px · iOS 27): Both <CommandDialog> and standalone <Command> (with default mobileDrawer={true}) open a 32px top-radius bottom Liquid Glass Drawer with a capsule search bar and Inset Grouped rows that dismiss upon selection.

Responsive Liquid Glass Command Palette (⌘J)

Triggered via the search button or shortcut="j" (⌘J / Ctrl+J, avoiding global ⌘K and browser-reserved ⌘L); switch Desktop / Mobile in the top-right to compare the centered modal and bottom drawer:

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

Installation (Shadcn Registry)

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

Modifier Shortcuts (shortcut="shift+k")

shortcut supports single keys (e.g. 'j') and modifier combos (e.g. 'shift+k' for ⇧⌘K / Ctrl+Shift+K, 'alt+k' for ⌥⌘K), allowing multiple command palettes on the same page without conflicts:

apple-liquid-ui/preview/command-dialog
MacBook · 16:10

Props API

CommandDialog

PropTypeDefaultDescription
shortcutstring | false—Optional global ⌘ / Ctrl + <key> shortcut ('j', 'shift+k', 'alt+k', etc.; omit or pass false to disable; avoid browser-reserved ⌘L / ⌘T / ⌘W)
openboolean—Controlled open state
onOpenChange(open: boolean) => void—Open/close state callback
titlestring'Command Palette'Centered mobile bottom drawer title (accessible title on desktop)
showCloseButtonbooleanfalseShow top-right close button on desktop
glassbooleantrueLiquid Glass material for the desktop dialog / mobile drawer; false renders 100% opaque. Inner <Command> inherits the surface

Command

PropTypeDefaultDescription
glassbooleantrueLiquid Glass material reacting to glass tint; false renders 100% opaque (provided by outer dialog inside <CommandDialog>)
mobileDrawerbooleantrueWhen used standalone, collapses into a search trigger on mobile (< 768px) that opens a bottom Drawer
mobileTriggerPlaceholderstring'Search commands or apps…'Placeholder copy for the collapsed mobile search trigger
mobileTitleReact.ReactNode'Command Palette'Centered title for the mobile bottom drawer

Language & Text

Command, CommandDialog accept 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.command 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<CommandMessages>Text overrides, merged over the built-in text and the global messages.command
KeyBuilt-in text (English)
titleCommand Palette
descriptionType a keyword to search or run a command…
mobileTriggerPlaceholderSearch commands or apps…

On this page