Skip to content
pandacoderz/ui

Command Palette

Cmd-K over app data that turns into a streamed AI answer with actionable results.

Command Palette
Open preview

What’s inside

  • Command Menu with pages, actions, and people groups plus an always-visible Ask AI item.
  • Answer mode streams a markdown reply and offers follow-up actions.
  • Host chrome mocks a docs page so the palette has context.

Installation

npx shadcn@latest add https://ui.spencerwueste.com/r/command-palette.json

The registry item pulls in every component it depends on.

Usage

import CommandPalette from "@/components/blocks/command-palette/command-palette";

export default function Page() {
  return (
    <div className="h-dvh p-4">
      <CommandPalette />
    </div>
  );
}

Give the parent a bounded height. The block fills it and scrolls internally.

Going live

Populate the groups from your router and data, and swap answers for a call to your model with the current page as context. Questions ending in a question mark route straight to answer mode on Enter.