ObjectUIObjectUI

Command

Fast command menu with search and keyboard navigation

The Command component provides a fast, searchable command menu with keyboard navigation.

Basic Usage

Command Menu

Schema

interface CommandItem {
  value: string;
  label: string;
  icon?: string;
  shortcut?: string[];
}

interface CommandGroup {
  heading?: string;
  items: CommandItem[];
}

interface CommandSchema {
  type: 'command';
  placeholder?: string;           // Search placeholder
  groups: CommandGroup[];         // Command groups
  emptyText?: string;             // Text when no results
  
  // Events
  onSelect?: string | ActionConfig;
  
  // Styling
  className?: string;
}

Examples

With Shortcuts

Command Palette With Shortcuts

On this page