A combobox that opens on focus under a leader with recent projects and filter chips; typing filters by name with env: and owner: prefixes, rows show a status node, meta and a 7-day spark, and nothing found offers Create.
pnpm dlx shadcn@latest add @beautiful-ui-pro/search-projectsNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { useRouter } from "next/navigation";
import { SearchProjects, type SearchProject } from "@/components/ui/notchset/search-projects";
const projects: SearchProject[] = [
{ id: "planner", name: "Planner", env: "PROD", owner: "MAYA", detail: "12 AGENTS", spark: [8, 9, 7, 10, 12, 11, 13, 14] },
{ id: "triage", name: "Triage", env: "STAGING", owner: "JONAS", detail: "4 AGENTS" },
];
export function ProjectSwitcher() {
const router = useRouter();
return <SearchProjects projects={projects} me="MAYA" onSelect={(p) => router.push(`/p/${p.id}`)} />;
}projects–
{ id, name, env, owner, detail?, spark? }[]The list.
recent–
string[]Ids shown before typing.
filters–
[prefix, value][]The chips (env:prod, owner:me…).
me–
stringWho owner:me means.
onSelect / onCreate–
fnOpen a project; create one from the query.
hotkey–
stringFocuses it from anywhere (/).
components/ui/notchset/search-projects.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.