Command

A command menu allows users to search and execute commands.

Create new file...
Create new folder...
Assign to...
Assign to me
Change status...
Change priority...
Add label...
Remove label...
<Command>
  <CommandInput />
  <CommandContent className="min-h-48">
    <CommandItem textValue="Create new file">
      Create new file...
    </CommandItem>
    <CommandItem textValue="Create new folder">
      Create new folder...
    </CommandItem>
    <CommandItem textValue="Assign to">Assign to...</CommandItem>
    <CommandItem textValue="Assign to me">Assign to me</CommandItem>
    <CommandItem textValue="Change status">Change status...</CommandItem>
    <CommandItem textValue="Change priority">
      Change priority...
    </CommandItem>
    <CommandItem textValue="Add label">Add label...</CommandItem>
    <CommandItem textValue="Remove label">Remove label...</CommandItem>
  </CommandContent>
</Command>

Installation

pnpm dlx shadcn@latest add @dotui/command

Usage

Use command menus to provide users with a searchable list of commands or actions.

import {
  Command,
  CommandContent,
  CommandInput,
  CommandItem,
} from "@/components/ui/command";
<Command>
  <CommandInput placeholder="Type a command..." />
  <CommandContent>
    <CommandItem textValue="Create file">Create new file</CommandItem>
    <CommandItem textValue="Open file">Open file</CommandItem>
  </CommandContent>
</Command>

Playground

Use the controls below to experiment with different command props and see the live preview and code update.

Create new file
Create new folder
Open file

API Reference

Command

Missing description.

Supports all div attributes.

CommandInput

Missing description.

PropType
string
boolean
boolean
union
string
string
union
union
ReactNode | function
string
string
function

CommandContent

Missing description.

PropType
boolean
boolean
DragAndDropHooks<NoInfer<T>>
"grid" | "stack"
Orientation
ReactNode | function
Iterable<T>
ReactNode | function
readonly any[]
SelectionMode
SelectionBehavior
Iterable<Key> | "all"
Iterable<Key> | "all"
function
Iterable<Key>
boolean
boolean
boolean
boolean
"none" | "clearSelection"

Last updated on 12/21/2025

dotUI

Bringing singularity to the web.

Built with passion by @mehdibha.