@yarcl/react
    Preparing search index...

    Function CommandPalette

    • A searchable command menu in a modal dialog, opened with a keyboard shortcut (⌘K or Ctrl+K by default). The search input is a combobox: arrow keys, Home and End move through the matching commands, Enter runs the highlighted one, Esc closes the palette and returns focus.

      Parameters

      Returns Element

      <CommandPalette
      commands={[
      { id: 'new', label: 'New file', group: 'File', shortcut: 'Mod+N', onSelect: createFile },
      { id: 'theme', label: 'Toggle dark mode', group: 'View', keywords: ['theme'], onSelect: toggleTheme },
      ]}
      />