Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Command palette

    A search box over a list of actions. Type to filter, move with the arrow keys, press Enter to run. Groups hold related actions, each row can carry an icon and a shortcut, and the palette can live inline on a page or open as a dialog from anywhere.

    Install

    npx shadcn@latest add @nelumbo/command

    Inline

    Groups are separated by space, not lines. The highlighted row sits on a raised pill that springs from row to row with the pointer and the arrow keys, and its icon tile turns inverse. Shortcuts written as one string, like ⌘N, split into keycaps and are read as one. Disabled rows stay visible at 40%.

    No actions match your search.

    Dialog

    CommandDialog opens over the page from a button or from ⌘K (Ctrl K elsewhere). Escape closes it. Its title and description are for screen readers only.

    Empty state

    CommandEmpty shows when nothing matches. The search is controlled here; clear it to see the list again.

    No files match “Quantum”.

    Loading

    CommandLoading shows inside the list while results are fetched. It is announced politely, and the spinner stops under reduced motion.

    Searching…

    Usage

    import {  Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput,  CommandItem, CommandList, CommandSeparator, CommandShortcut,} from "@/components/ui/command"​const [open, setOpen] = React.useState(false)​React.useEffect(() => {  const onKey = (e: KeyboardEvent) => {    if (e.key.toLowerCase() === "k" && (e.metaKey || e.ctrlKey)) {      e.preventDefault()      setOpen((o) => !o)    }  }  window.addEventListener("keydown", onKey)  return () => window.removeEventListener("keydown", onKey)}, [])​<CommandDialog open={open} onOpenChange={setOpen}>  <CommandInput placeholder="Type a command…" />  <CommandList>    <CommandEmpty>No results.</CommandEmpty>    <CommandGroup heading="Create">      <CommandItem onSelect={() => { newFile(); setOpen(false) }}>        <Icon name="note_add" />        New file        <CommandShortcut>⌘N</CommandShortcut>      </CommandItem>    </CommandGroup>    <CommandSeparator />  </CommandList></CommandDialog>

    Props

    PropTypeDefaultNotes
    CommandRounded surface-container-high container with menu elevation. Extra props go to cmdk
    CommandDialog open / onOpenChangeboolean / (open) => voidControlled, like Dialog
    CommandDialog title / descriptionstring"Command palette"Visually hidden, read by screen readers
    CommandInput placeholder / value / onValueChangestringControlled search text
    CommandListScrolls past about 22rem (70dvh)
    CommandEmptyReactNodeShown when nothing matches
    CommandLoadingReactNodeSpinner and “Searching…”Put it inside CommandList while results load
    CommandGroup headingReactNodeMuted label above the rows, no rule
    CommandItem onSelect / value(value) => void / stringEnter or click runs it; value defaults to its text
    CommandItem disabledbooleanfalseShown at 40%, can't be highlighted
    CommandItem keywordsstring[]Extra terms that match the search
    CommandShortcutReactNodeKeycap on the trailing edge
    CommandSeparatorEmpty spacer between groups, hidden while searching