An app bar whose search key widens across the whole bar as the nav slides away, with a results sheet that unrolls below in scopes with live counts, grouped results and underlined matches.
pnpm dlx shadcn@latest add @beautiful-ui-pro/search-expandNeeds 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 * as React from "react";
import { SearchExpand, type SearchExpandGroup } from "@/components/ui/notchset/search-expand";
const results: SearchExpandGroup[] = [
{ id: "agents", label: "AGENTS", items: [{ label: "Planner", meta: "PROD" }, { label: "Triage", meta: "STAGING" }] },
{ id: "runs", label: "RUNS", items: [{ label: "run_8f3a1", meta: "OK · 2.1S" }, { label: "run_8f3a2", meta: "FAILED", tone: "signal" }] },
];
export function AppBar({ children }: { children: React.ReactNode }) {
return (
<SearchExpand
nav={
<nav className="flex gap-4 font-mono text-xs">
<a href="/agents">AGENTS</a>
<a href="/runs">RUNS</a>
</nav>
}
groups={results}
>
{children}
</SearchExpand>
);
}nav–
ReactNodeThe bar's left side; it fades away while searching.
groups–
{ id, label, items: { label, meta?, tone?, hollow?, onSelect? }[] }[]Results by scope.
children–
ReactNodeThe page; it dims while searching.
hotkey–
stringOpens search from anywhere (/).
components/ui/notchset/search-expand.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.