Command

Filterable command palette with grouped items, shortcuts, and keyboard navigation. Render inline or inside a modal CommandDialog (⌘K style).

File
New file⌘ N
Open file…⌘ O
Save⌘ S
Preferences
Toggle theme
Open settings

Usage

import { Command, CommandDialog } from '@bwo-ui/react';

const items = [
  { id: 'new',   label: 'New file', group: 'File', shortcut: '⌘N', onSelect: newFile },
  { id: 'save',  label: 'Save',     group: 'File', shortcut: '⌘S', onSelect: save },
];

<CommandDialog open={open} onOpenChange={setOpen}>
  <Command items={items} />
</CommandDialog>

Props — Command

PropTypeDefaultDescription
itemsCommandItemEntry[]—Items (grouped by their group field).
placeholderstring—Search input placeholder.
filter(item, query) => boolean—Custom matcher (default: case-insensitive across label + keywords).
emptyStateReactNode—Rendered when no items match.
searchstring—Controlled search input value.
onSearchChange(s: string) => void—Search change handler.

Props — CommandDialog

PropTypeDefaultDescription
openboolean—Controlled open state.
onOpenChange(open: boolean) => void—Open change handler.
titlestring'Command Palette'Accessible (screen-reader-only) title.