Skip to content

InputsLumen Halo

Compact SearchProv1.0.0

Search that takes no room until it's needed: an icon in a top bar opens, in place, into a Search Box that grows from where the icon sits, with results underneath that arrow keys walk. Escape or a click away folds it back to the icon and keeps what you typed.

Built on shadcn/ui

.md
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-compact-search

Needs 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.

Set up the Beautiful UI registry

Free pieces install from their URL with no setup (that URL gives the Base UI build; Radix projects use /r/radix-nova/<name>.json, or add the registries below and the CLI picks your build). Pro pieces need the registries below and BEAUTIFUL_UI_TOKEN in .env.local.

components.json
{
  "registries": {
    "@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
    "@beautiful-ui-pro": {
      "url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
      "headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
    }
  }
}

MCP server

claude mcp add --transport http beautiful-ui https://beautiful-ui.dev/api/mcp
Catalog for agents: /llms.txt

Usage

Import it and pass your content. The props that matter most are listed next.

Example
"use client";

import * as React from "react";
import { CompactSearch } from "@/components/ui/lumen/controls/compact-search";

export function TopBarSearch({ pages }: { pages: { id: string; label: string }[] }) {
  const [q, setQ] = React.useState("");
  const hits = pages.filter((p) => p.label.toLowerCase().includes(q.toLowerCase()));
  return <CompactSearch value={q} onValueChange={setQ} results={hits} onResultSelect={(hit) => console.log(hit.id)} />;
}

Props

  • results / onResultSelect–

    { id, label, description? }[]

    Listed under the field while there's a query; Enter or a click selects.

  • value / defaultValue / onValueChange–

    string

    The query, controlled or not (kept while folded).

  • expanded / defaultExpanded / onExpandedChange–

    boolean

    Open or folded, controlled or not.

  • width280

    number

    The open width in px (it never exceeds the screen).

  • loading / placeholder / label"Search"

    Search Box props

    label names the icon button and the field.

Source

components/ui/lumen/controls/compact-search.tsx

This component is included with Pro.

Try the live preview above. Get Pro to install the source.