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 customshortcut(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 defaultmobileDrawer={true}) open a32pxtop-radius bottom Liquid GlassDrawerwith 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:
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/commandModifier 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:
Props API
CommandDialog
| Prop | Type | Default | Description |
|---|---|---|---|
shortcut | string | false | — | Optional global ⌘ / Ctrl + <key> shortcut ('j', 'shift+k', 'alt+k', etc.; omit or pass false to disable; avoid browser-reserved ⌘L / ⌘T / ⌘W) |
open | boolean | — | Controlled open state |
onOpenChange | (open: boolean) => void | — | Open/close state callback |
title | string | 'Command Palette' | Centered mobile bottom drawer title (accessible title on desktop) |
showCloseButton | boolean | false | Show top-right close button on desktop |
glass | boolean | true | Liquid Glass material for the desktop dialog / mobile drawer; false renders 100% opaque. Inner <Command> inherits the surface |
Command
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders 100% opaque (provided by outer dialog inside <CommandDialog>) |
mobileDrawer | boolean | true | When used standalone, collapses into a search trigger on mobile (< 768px) that opens a bottom Drawer |
mobileTriggerPlaceholder | string | 'Search commands or apps…' | Placeholder copy for the collapsed mobile search trigger |
mobileTitle | React.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.
| Prop | Type | Description |
|---|---|---|
locale | LiquidGlassLocaleInput | UI language of this component (any BCP 47 tag; unsupported ones fall back to English) |
messages | Partial<CommandMessages> | Text overrides, merged over the built-in text and the global messages.command |
| Key | Built-in text (English) |
|---|---|
title | Command Palette |
description | Type a keyword to search or run a command… |
mobileTriggerPlaceholder | Search commands or apps… |
Combobox
Responsive Apple Liquid Glass searchable selector featuring a pill macOS 27 glass input and floating dropdown on desktop, and automatically switching to an iOS 27 bottom Liquid Glass Drawer with search bar and grouped list on mobile.
ContextMenu
Responsive Apple Liquid Glass context menu opening a macOS 27 floating Liquid Glass menu on desktop right-click, and a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer with submenu drill-down on mobile long-press.