# Command menu animation (/docs/components/command)




## What it fixes [#what-it-fixes]

`CommandDialog` is a dialog, so it gets the same rack focus: it grows out of the button you pressed, or from the centre when you open it with a shortcut. The search on this site runs on it. Press ⌘K to try it.

## Install [#install]

```bash
npx shadcn add command
```

## Choose a cut [#choose-a-cut]

The command menu follows the `dialog` menu:

```tsx
<Cuts dialog="punch-in" />
```

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `dialog (on <Cuts>)` | `"rack-focus" \| "punch-in" \| "fade" \| "none"` | `"rack-focus"` | The cut for dialogs, alert dialogs and the command menu. |

A keyboard shortcut counts as a press only when a focused element receives it. A global ⌘K listener has no opener, so the menu opens from the centre.
