Command

Command palette components for search-first action menus.

Overview

Command provides command palette building blocks for shortcut-based and search-driven workflows.

Usage

import {
  Command,
  CommandDialog,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
  CommandSeparator,
  CommandShortcut,
} from "@tilt-legal/cubitt-components/command";
<Command>
  <CommandInput placeholder="Search commands..." />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Workspace">
      <CommandItem value="files">Files</CommandItem>
      <CommandItem value="settings">
        Settings
        <CommandShortcut>G S</CommandShortcut>
      </CommandItem>
    </CommandGroup>
    <CommandSeparator />
  </CommandList>
</Command>
<CommandDialog open>
  <CommandInput placeholder="Jump to..." />
  <CommandList>
    <CommandGroup heading="Workspace">
      <CommandItem value="recent-files">Recent files</CommandItem>
    </CommandGroup>
  </CommandList>
</CommandDialog>

Examples

Surface

Dialog Open

On this page