AppCommandBar

App

Keyboard-first command palette. Opens with ⌘K. Lists the `items` it gets plus every command registered with `registerCommand` / `registerCommands` / `useRegisterCommand`; commands carry `group`, `order` and `hidden`. Sample commands only with `demo`.

Sample commands (demo)

Preview
Code
<AppCommandBar demo onSelect={(item) => console.log(item.label)} />

Özel items + trigger

Preview
Code
<AppCommandBar
  items={customItems}
  trigger={<Button variant="ghost" size="sm" iconRight={<Badge variant="neutral" size="sm">⌘K</Badge>}>Search…</Button>}
  onSelect={handleSelect}
/>

Fuzzy search + özel gruplar

Preview
Code
// Try typing "kbd", "asgn" or "rls" to exercise the subsequence matcher.
const fuzzyItems = [
  { icon: '⌨️', label: 'Open Keyboard Shortcuts',  shortcut: '?',   category: 'Help',        keywords: ['kbd'] },
  { icon: '📚', label: 'Browse Documentation',     shortcut: 'G H', category: 'Help' },
  { icon: '🔔', label: 'Notification Preferences', shortcut: 'G N', category: 'Preferences' },
  { icon: '🛠️', label: 'Assign Reviewer to PR-42', shortcut: 'A R', category: 'Workflows',   keywords: ['asgn'] },
  { icon: '🚀', label: 'Release & Tag v1.4.0',     shortcut: 'R T', category: 'Workflows',   keywords: ['rls'] },
];

<AppCommandBar items={fuzzyItems} />

Registered commands: group, order, hidden

Preview
Code
// Any module adds commands to the shared registry; the palette lists them with its own items.
useEffect(() => registerCommands([
  { id: 'tel-call', label: 'Call a contact', group: 'Telephony', order: 30, hidden: !canCall },
  { id: 'tel-log', label: 'Open call log', group: 'Telephony', order: 31 },
]), [canCall]);

<AppCommandBar items={[
  { id: 'go-home', label: 'Go to dashboard', group: 'Navigation', order: 0 },
  { id: 'new-lead', label: 'New lead', group: 'Create', order: 10 },
]} />
Sourcemodules/app/CommandPalette/index.tsx