Go to...

Choose a page to open.

A searchable list of commands that you filter by typing.

Command

command-demo

Installation

pnpm dlx shadcn@latest add https://ui.n2020.com/r/command.json

Usage

import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
} from "@/components/ui/command";
<Command>
  <CommandInput placeholder="Type a command or search" />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Open calendar</CommandItem>
      <CommandItem>Invite a teammate</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

Examples

Dialog

CommandDialog shows the command list in a dialog. Control it with open and onOpenChange.

command-palette