Components
VS Code Command Palette UI component with vscode theme based styling and icons
Loading preview...
import { Component } from "@/components/ui/vs-code-command-palette";
const commands = [
{ id: "1", label: "Search Files", category: "General", icon: "search" },
{ id: "2", label: "New Document", category: "General", icon: "file", shortcut: "⌘N" },
{ id: "3", label: "Settings", category: "General", icon: "settings" },
{ id: "4", label: "Profile", category: "Account", icon: "user" },
{ id: "5", label: "Open Terminal", category: "Developer", icon: "terminal" },
];
export default function Demo() {
return (
<div className="flex min-h-[400px] items-center justify-center bg-muted p-10 rounded-2xl">
<Component
commands={commands}
onSelect={(cmd) => console.log("Selected:", cmd.label)}
/>
</div>
);
}