Command palette uses a component for the overlay and typed command group data.

command-palette.ts
import {
  KuiButtonDirective,
  KuiCommandGroup,
  KuiCommandItem,
  KuiCommandPaletteComponent,
} from '@kikita-labs/ui';

Control open and query with signals, and run commands from the selected output.

<div class="basic-command-palette-example">
  <button kuiButton type="button" (click)="open.set(true)">Open command palette</button>

  @if (selectedCommand(); as command) {
    <p class="basic-command-palette-example__selection">Selected: {{ command }}</p>
  }

  <kui-command-palette
    [(open)]="open"
    [(query)]="query"
    [groups]="groups"
    (selected)="runCommand($event)"
  />
</div>

Items support metadata for rendering and keywords for search matching.

item data.ts
const groups: readonly KuiCommandGroup[] = [
  {
    heading: 'Project',
    items: [
      {
        id: 'rename',
        label: 'Rename project',
        description: 'Update the display name.',
        meta: 'Project',
        badge: 'New',
        shortcut: ['F2'],
        icon: 'R',
        keywords: ['edit', 'title'],
      },
      {
        id: 'delete',
        label: 'Delete project',
        danger: true,
        disabled: true,
      },
    ],
  },
];

Inputs and outputs verified against @kikita-labs/ui v1.6.1 public typings.

NameTypeDefaultDescription
openModelSignal<boolean>Two-way model controlling overlay visibility.
groupsreadonly KuiCommandGroup[]Command groups rendered in the list.
loadingbooleanRenders skeleton rows and sets aria-busy.
placeholderstringSearch input placeholder.
labelstringAccessible label for the modal dialog and search input.
emptyTextstringEmpty-state title when no command matches.
queryModelSignal<string>Two-way model for the current search value.
selectedOutputEmitterRef<KuiCommandItem>Emits the selected command item.

The palette uses modal dialog semantics, focus trapping, and listbox navigation.

  • The palette renders through a CDK overlay with scroll blocking and a modal dialog container. Set label to describe the dialog and search input for screen readers.
  • A CDK focus trap keeps focus inside the palette while open. Focus returns to the element that opened the palette after it closes.
  • The search input exposes combobox and listbox relationships through aria-controls and aria-activedescendant.
  • Arrow keys move the active option; Enter selects it.
  • Escape closes the palette and restores focus.
  • Disabled commands are skipped by keyboard navigation and cannot be selected.
  • Setting loading renders skeleton rows and sets aria-busy on the list while results are pending.
  • Formal assistive-technology review is still pending for Command Palette per state-coverage.md; only static and browser smoke review have been completed so far.