Morph command
A command box that grows from a button into a palette.
Last opened: Q4 roadmap
When to use
- A quiet entry to search and actions.
When not to use
- The palette is always open.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/morph-command
Adds its 8 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
MorphCommand
6 props
PropTypeDefaultDescription
items *readonly CommandItem[]—
placeholderstring"Search or jump to…"
labelstring"Command palette"
shortcutbooleantrueOpen with Cmd or Ctrl + K.
hintReactNode"⌘K"
classNamestring—
Keyboard
- Escape
- Closes or cancels, then returns focus to where it came from.
- Tab
- Moves focus through the part's focusable elements.
- ↓
- Moves to the next item or value.
- ↑
- Moves to the previous item or value.
- Enter
- Activates the focused control.
- Home
- Jumps to the first item or the minimum.
Accessibility
It exposes dialog, combobox, listbox, group, option and status semantics, with aria-haspopup, aria-expanded, aria-hidden, aria-modal, aria-label and aria-controls kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/morph-command.mdThe index of every part is at /llms.txt.