Command

A command palette for searching and selecting from a list of options. Supports keyboard navigation, grouping, and filtering.

Command Palette

<Command className="rounded-lg border">
  <CommandInput placeholder="Type a command or search..." />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Calendar</CommandItem>
      <CommandItem>Search</CommandItem>
      <CommandItem>Settings</CommandItem>
    </CommandGroup>
    <CommandGroup heading="Recent">
      <CommandItem>Dashboard</CommandItem>
      <CommandItem>Projects</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

API Reference

PropTypeDefaultDescription
classNamestringAdditional CSS classes to apply to the command container.
children
required
React.ReactNodeCompose with CommandInput, CommandList, CommandGroup, CommandItem, and CommandEmpty.