Skip to content

InputsLumen Halo

Search BoxFreev1.0.0

A search field that says what it found: the count of results sits in the field (a short run of cells while they load), Escape clears and then leaves, and the count is announced once it settles. The ⌘K shortcut is opt-in, so it never fights your command palette.

Built on shadcn/ui

.md
Base UIpnpm dlx shadcn@latest add https://beautiful-ui.dev/r/lumen-search-box.json
Radixpnpm dlx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/lumen-search-box.json

Free, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @beautiful-ui registry added, @beautiful-ui/<name> picks for you.

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
Slow results
⌘K shortcut

Usage

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

Example
"use client";

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

export function People({ people }: { people: { name: string }[] }) {
  const [q, setQ] = React.useState("");
  const found = people.filter((p) => p.name.toLowerCase().includes(q.toLowerCase()));
  return <SearchBox value={q} onValueChange={setQ} resultCount={found.length} placeholder="Search people" />;
}

Props

  • value / defaultValue / onValueChange–

    string

    Controlled or not.

  • resultCount–

    number

    How many results the query found: shown in the field, announced once it settles.

  • loadingfalse

    boolean

    A run of cells replaces the count while results load.

  • onSubmit–

    (query: string) => void

    Enter.

  • shortcutfalse

    boolean

    Focus with ⌘K / Ctrl K and show the hint.

  • resultLabel"n results"

    (count) => string

    The spoken words, for other languages.

Show all 7 props
  • ...input props–

    input attributes

    placeholder, name, disabled, aria-label (default "Search") and so on.

Source

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