---
title: "Command Palette N.01"
description: "The ⌘K palette of a project tool over its app: recent issues, actions with shortcuts, and go-to pages, opened from the sidebar Search row."
url: https://gelatinui.com/blocks/command-palette-01
markdown_url: https://gelatinui.com/blocks/command-palette-01.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/command-palette-01"
version: "2026-11-16"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Command Palette N.01

> The ⌘K palette of a project tool over its app: recent issues, actions with shortcuts, and go-to pages, opened from the sidebar Search row.

Page: https://gelatinui.com/blocks/command-palette-01

## When to use it

Best for: The ⌘K palette of a work app, over its sidebar and page, with recent items, actions, and go-to pages.

- Use it as the command palette of a project, ticket, or docs app.
- Pass your words and rows through `content`. Start from `COMMAND_PALETTE_01_DEFAULT_CONTENT`, and change the fields you need.
- Wire `onClick` of each `CommandPalette01Item` to your app: a row runs it and closes the palette.

## When not to use it

- For a palette with no app frame around it, use a [Command](https://gelatinui.com/components/command.md).
- For the nav of an app with no palette, use a [Sidebar](https://gelatinui.com/components/sidebar.md).

## Notes for agents

- The palette opens with the page (`defaultPaletteOpen` is `true`). Pass `defaultPaletteOpen={false}` to start closed, or `paletteOpen` with `onPaletteOpenChange` to control it.
- ⌘K (Ctrl+K elsewhere) opens the palette, or closes it when it is open. The key belongs to `CommandPalette01Palette`, so it works with no Search row.
- Esc, a click outside, or a row closes it. The Search row in the sidebar opens it, and closes the phone Drawer first.
- Open on load, the palette keeps the page focus. The first press or ⌘K moves the focus into the field.
- A search with no match shows the `nextSteps` rows. `{query}` in a label or in `noMatchTitle` becomes the search text.
- The key chips only show the keys: the palette does not bind C, I, S, or G then I.
- To change the order or drop a part, pass the parts as children. With children, the block ignores `content`.

## Anatomy

```text
CommandPalette01
├─ CommandPalette01Brand (0..n)
├─ CommandPalette01Default (0..n)
├─ CommandPalette01Hints (0..n)
├─ CommandPalette01Item (0..n)
├─ CommandPalette01Page (0..n)
├─ CommandPalette01Palette (0..n)
├─ CommandPalette01Panel (0..n)
│  └─ CommandPalette01Row (0..n)
└─ CommandPalette01Search (0..n)
```

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| CommandPalette01 | `command-palette-01` |  |  |  |
| CommandPalette01Brand | `command-palette-01-brand` |  |  |  |
| CommandPalette01Default | `command-palette-01-panel` |  | `--radius` |  |
| CommandPalette01Hints | `command-palette-01-hints` |  |  |  |
| CommandPalette01Item | `command-palette-01-item` | `data-highlighted` |  | `motion-timing` |
| CommandPalette01Page | `command-palette-01-page` |  |  |  |
| CommandPalette01Palette | `command-palette-01-palette` |  |  |  |
| CommandPalette01Panel | `command-palette-01-panel` |  |  |  |
| CommandPalette01Row | `command-palette-01-row` |  |  |  |
| CommandPalette01Search | `command-palette-01-search` |  |  |  |

## Usage

Render it with no props for the ready app with the palette open.

```tsx title="app-frame.tsx"
import { CommandPalette01 } from "@/components/blocks/pro/command-palette-01/command-palette-01";

export function AppFrame() {
  return <CommandPalette01 />;
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/command-palette-01
```

It adds 68 registry items: 77 files, 13689 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Autocomplete](https://gelatinui.com/components/autocomplete.md)
- [Avatar](https://gelatinui.com/components/avatar.md)
- [Breadcrumb](https://gelatinui.com/components/breadcrumb.md)
- [Command](https://gelatinui.com/components/command.md)
- [Generated Avatar](https://gelatinui.com/components/generated-avatar.md)
- [Kbd](https://gelatinui.com/components/kbd.md)
- [Sidebar](https://gelatinui.com/components/sidebar.md)
- [Status Icon](https://gelatinui.com/components/status-icon.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Command](https://gelatinui.com/components/command.md)
- [Sidebar](https://gelatinui.com/components/sidebar.md)
- [Kbd](https://gelatinui.com/components/kbd.md)
- [Dialog](https://gelatinui.com/components/dialog.md)

## Keyboard

| Keys | Action |
| --- | --- |
| ⌘K, Ctrl+K | Opens the palette, or closes it. |
| ↑ ↓, Home, End | Moves the lit row. |
| Enter | Runs the lit row and closes the palette. |
| Esc | Closes the palette, and focus goes back to the Search row. |

## Accessibility

The palette is a modal Dialog: focus stays inside it, and closes go back to the Search row.

The Search row has `aria-haspopup="dialog"` and names ⌘K in `aria-keyshortcuts`.

The open project row has `aria-current="page"`.

## Motion

| Part | Motion |
| --- | --- |
| Palette | popup · the palette opens and closes |
| Drawer | sheet · the sidebar under 768px |
