zynactradocs

Command

A searchable list of commands, inline or as a ⌘K palette.

Usage

import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
} from "@zynactra/ui/command"
<Command>
  <CommandInput placeholder="Search..." />
  <CommandList>
    <CommandEmpty>No results.</CommandEmpty>
    <CommandGroup heading="Projects">
      <CommandItem>UB Finance HRIS</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

Examples

Dialog

Wrap it in CommandDialog and bind a shortcut. Try Ctrl + J on this page.

Command Palette

Search for a command to run...

Guidelines

  • One palette per app, on ⌘K / Ctrl K, unless the docs site already owns that key (this one does, so the example uses J).
  • Group by type (Projects, Actions, Settings) and show shortcuts on the right.
  • Every item does something on select: navigate, run, or open a dialog. Close the palette after.

API reference

Built on cmdk.

Edit on GitHub

On this page