Skip to Content
ComponentsCommand

Command

A fast, composable command palette for search, navigation and quick actions. Built on cmdk .

import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "@/components/ui/command"
<Command> <CommandInput placeholder="Search…" /> <CommandList> <CommandEmpty>No results found.</CommandEmpty> <CommandGroup heading="Suggestions"> <CommandItem>Calendar</CommandItem> <CommandItem>Search Emoji</CommandItem> </CommandGroup> <CommandSeparator /> <CommandGroup heading="Settings"> <CommandItem> Profile <CommandShortcut>⌘P</CommandShortcut> </CommandItem> </CommandGroup> </CommandList> </Command>

Examples

Inline (no border)

<Command> <CommandInput placeholder="Search…" /> <CommandList> <CommandGroup heading="Recent"> <CommandItem>Profile</CommandItem> <CommandItem>Settings</CommandItem> </CommandGroup> </CommandList> </Command>
Last updated on