# Shadcn Command

> Open-source shadcn command menu components for command palettes, global search, and power-user navigation.

- Type: shadcn/ui component, free
- Page: https://web.dev.reui.io/components/command
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/command.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/command.md
- MCP: `get_component("command")`, then `get_examples("command")`
- Examples: 8

## When to use

- Keyboard driven palettes in a modal that search actions, pages and settings from one input
- Search lists of files, team members, favorites and recent pages that narrow as the user types
- Inline menus kept open in a card or panel, with grouped rows and keyboard shortcut hints

## When not to use

- A form field that keeps the option the user picks, such as a country or an assignee: use [Combobox](https://web.dev.reui.io/components/combobox.md) (`get_component("combobox")`)
- A complete product layout with sidebar navigation, where search is only one of its parts: use the [App Shell blocks](https://web.dev.reui.io/blocks/application/app-shell.md)
- A top bar above your page with brand, menus and alerts, where search sits beside them: use the [Navbar blocks](https://web.dev.reui.io/blocks/application/navbar.md)

## Agent notes

- No example gives a `CommandItem` a select handler, so pressing Enter or clicking a row runs nothing until you add one
- `CommandList` stops at 18rem tall in every style and scrolls the rows past that height inside itself

## Third-party libraries

- cmdk v1: [API reference](https://github.com/dip/cmdk#parts-and-styling), [docs](https://github.com/dip/cmdk)

## Examples

- [Basic](https://web.dev.reui.io/components/command/c-command-1.md): Basic command. Best for an always open list inside a narrow Card, with a disabled Calculator row and shortcut hints on the Settings rows only.
- [Shortcuts](https://web.dev.reui.io/components/command/c-command-2.md): Command with shortcuts. Best for the smallest modal palette, a single Settings group of 3 rows with a shortcut hint on each.
- [Groups](https://web.dev.reui.io/components/command/c-command-3.md): Command with groups. Best for a modal with 2 groups, Suggestions as plain rows and Settings rows with shortcut hints, split by a separator.
- [Many Groups](https://web.dev.reui.io/components/command/c-command-4.md): Command with many groups. Best for a dense palette of 5 groups and 23 rows, from navigation and file actions to view, account and tools.
- [File Search](https://web.dev.reui.io/components/command/c-command-5.md): File search command palette. Best for a file finder whose rows show name, muted path and a type Badge, opened from a search style trigger with a Kbd hint.
- [User Search](https://web.dev.reui.io/components/command/c-command-6.md): User search command with avatars. Best for a people search with avatar, name over email, and a role Badge tinted per Admin, Editor or Viewer.
- [Action Palette](https://web.dev.reui.io/components/command/c-command-7.md): Action palette with keyboard shortcuts. Best for task verbs grouped as Create, Navigate and System, from New Project and Invite Member to dark mode and sign out.
- [Recent & Favorites](https://web.dev.reui.io/components/command/c-command-8.md): Command with recent and favorites sections. Best for a jump list of starred favorites, recent pages stamped 2m to 2h ago and help links, opened as Search Everything.

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
