Components/Command

Command

Composable, searchable command palette — fast keyboard-first access to actions, navigation, and search.


Suggestions
Calendar
Search emoji
Calculator
Settings
Profile ⌘P
Settings ⌘,

Installation

npx ajaxui add command

Notes

Anatomy

<Command>                   // input + filtering owner
  <CommandInput/>
  <CommandList>
    <CommandEmpty/>           // shown when nothing matches
    <CommandGroup heading=...>
      <CommandItem/>          // typed by .value
    </CommandGroup>
    <CommandSeparator/>
  </CommandList>
</Command>

Props

PropTypeDefaultDescription
filter(search: string, value: string) => booleanCustom filter for items.
onSelect(value: string) => void (on Item)
disabledboolean (on Item)