# Search input

Search with clear, loading and results states.

Access: free. Category: Forms. Kind: primitive.

## When to use

- Use it when a product interface needs search with clear, loading and results states.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.

## Alternatives

- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than search input.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Search input

```sh
npx shadcn@latest add https://tidalui.com/r/search-field.json
```

Stylesheets: `components/ui/tidal.css`, `components/ui/search-field.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/search-field.css";
import{TidalSearchField}from"./components/ui/search-field";
export default()=><div className="tidal-scope"><TidalSearchField label={"Demo"} onValueChange={() => {}} value={"value"}/></div>;
```

## Structured props

- `TidalSearchField.label: string`: Required label value accepted by this exported component.
- `TidalSearchField.onValueChange: (value: string) => void`: Callback invoked when the value change interaction is proposed.
- `TidalSearchField.value: string`: Required value value accepted by this exported component.
- `TidalSearchField.announce?: boolean | undefined` (default false): Optional announce value accepted by this exported component.
- `TidalSearchField.description?: string | undefined`: Optional description value accepted by this exported component.
- `TidalSearchField.error?: string | undefined`: Optional error value accepted by this exported component.
- `TidalSearchField.onSearch?: ((value: string) => void) | undefined`: Callback invoked when the search interaction is proposed.
- `TidalSearchField.pending?: boolean | undefined` (default false): Optional pending value accepted by this exported component.
- `TidalSearchField.resultCount?: number | undefined`: Optional result count value accepted by this exported component.
- `TidalSearchField.rootClassName?: string | undefined` (default ""): Optional root class name value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/search-field.tsx) | [Manifest](https://tidalui.com/examples/search-field.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
import "./components/ui/tidal.css";

import { useEffect, useId, useLayoutEffect, useRef, useState, type CSSProperties } from "react";

import { ArrowUpRight, FileText, Folder, Layers, Search, UserRound, X } from "lucide-react";

import { TidalSearchField } from "./components/ui/search-field";

import { TidalButton } from "./components/ui/tidal-button";

import "./components/ui/search-field.css";



const tidalExampleStyles = ".search-field-specimen {\n  width: 100%;\n  max-width: 670px;\n  padding: 28px;\n  border: 1px solid var(--t-border);\n  border-radius: var(--t-radius-card);\n  background: var(--t-surface);\n  box-shadow:\n    0 24px 40px -28px #00000035,\n    0 2px 4px #00000008;\n}\n.search-field-specimen > h3 {\n  font-size: 29px;\n  line-height: 1.08;\n  letter-spacing: -1px;\n  font-weight: 500;\n  margin: 13px 0 26px;\n}\n.search-field-specimen > h3 > em {\n  font-family: \"Instrument Serif\", serif;\n  font-size: 1.2em;\n  font-weight: 400;\n}\n.search-demo-window {\n  border: 1px solid var(--t-border);\n  border-radius: 13px;\n  background: var(--t-subtle);\n  overflow: hidden;\n}\n.search-demo-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  padding: 16px 20px;\n  border-bottom: 1px solid var(--t-border);\n  font-size: 11px;\n  color: var(--t-muted);\n  letter-spacing: 0.7px;\n}\n.search-demo-top > span:first-child {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n.search-demo-top > span:last-child {\n  font-size: 11px;\n  letter-spacing: 0;\n}\n.search-demo-input {\n  padding: 22px 20px 12px;\n  background: var(--t-surface);\n}\n.search-demo-suggestions {\n  display: flex;\n  gap: 6px;\n  padding: 0 20px 15px;\n  background: var(--t-surface);\n}\n.search-demo-suggestions > button {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  min-height: 44px;\n  padding: 0 12px;\n  border: 1px solid var(--t-border);\n  border-radius: 8px;\n  background: var(--t-subtle);\n  color: var(--t-muted);\n  font: inherit;\n  font-size: 11px;\n  transition:\n    background 180ms,\n    color 180ms,\n    transform 140ms;\n}\n.search-demo-suggestions > button:hover {\n  background: var(--t-ink);\n  color: var(--t-surface);\n}\n.search-demo-suggestions > button:active {\n  transform: translateY(1px);\n}\n.search-demo-results-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  padding: 14px 20px 5px;\n  border-top: 1px solid var(--t-border);\n  font-size: 11px;\n  letter-spacing: 0.7px;\n  color: var(--t-muted);\n}\n.search-demo-results-top > span:last-child {\n  font-size: 11px;\n  letter-spacing: 0;\n}\n.search-demo-stage {\n  padding: 6px 0;\n  overflow: hidden;\n  transition: height 420ms var(--t-ease-out);\n}\n.search-demo-content {\n  display: flow-root;\n}\n.search-demo-results {\n  list-style: none;\n  margin: 0;\n  padding: 7px 14px;\n  display: grid;\n  gap: 7px;\n}\n.search-demo-results > li {\n  animation: search-result-in 420ms var(--t-ease-out) var(--search-delay) both;\n}\n.search-demo-results button {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  min-height: 65px;\n  width: 100%;\n  padding: 11px 13px;\n  text-align: left;\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  font: inherit;\n  transition:\n    border-color 180ms,\n    box-shadow 180ms,\n    transform 180ms var(--t-ease-out);\n}\n.search-demo-results button:hover,\n.search-demo-results button[aria-expanded=\"true\"] {\n  border-color: var(--t-muted);\n  box-shadow: 0 3px 8px #00000008;\n}\n.search-demo-results button:active {\n  transform: scale(0.99);\n}\n.search-demo-record-icon {\n  display: grid;\n  place-items: center;\n  width: 34px;\n  height: 36px;\n  border-radius: 7px;\n  background: var(--t-wash);\n  flex-shrink: 0;\n  transition:\n    background 180ms,\n    color 180ms,\n    transform 320ms var(--t-ease-spring);\n}\n.search-demo-results button:hover .search-demo-record-icon,\n.search-demo-results button[aria-expanded=\"true\"] .search-demo-record-icon {\n  background: var(--t-ink);\n  color: var(--t-surface);\n  transform: rotate(-5deg);\n}\n.search-demo-results button > span:nth-child(2) {\n  flex: 1;\n  min-width: 0;\n}\n.search-demo-results strong {\n  display: block;\n  font-size: 12px;\n  line-height: 1.5;\n  font-weight: 500;\n}\n.search-demo-results small {\n  display: block;\n  font-size: 11px;\n  line-height: 1.5;\n  color: var(--t-muted);\n  margin-top: 2px;\n}\n.search-demo-kind {\n  font-size: 11px;\n  color: var(--t-muted);\n  padding: 3px 6px;\n  border: 1px solid var(--t-border);\n  border-radius: 4px;\n}\n.search-demo-results mark {\n  background: var(--t-ink);\n  color: var(--t-surface);\n  border-radius: 3px;\n  padding: 1px 2px;\n  margin: 0 -2px;\n}\n.tidal-scope .search-demo-expand {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  width: 100%;\n  min-height: 44px;\n  margin: 0;\n  padding: 0 12px;\n  border: 0;\n  border-top: 1px solid var(--t-border);\n  background: var(--t-surface);\n  color: var(--t-muted);\n  font: inherit;\n  font-size: 11px;\n  transition:\n    background 180ms,\n    color 180ms;\n}\n.search-demo-expand:hover {\n  background: var(--t-wash);\n  color: var(--t-ink);\n}\n.search-demo-expand:focus-visible {\n  outline-offset: -5px;\n}\n.search-demo-empty {\n  padding: 22px 20px;\n  text-align: center;\n  animation: search-result-in 420ms var(--t-ease-out) both;\n}\n.search-demo-empty > svg {\n  color: var(--t-muted);\n  margin-bottom: 10px;\n}\n.search-demo-empty > strong {\n  display: block;\n  font-size: 16px;\n  font-weight: 500;\n  letter-spacing: -0.3px;\n}\n.search-demo-empty > p {\n  font-size: 11px;\n  line-height: 1.7;\n  color: var(--t-muted);\n  margin: 9px auto 17px;\n  overflow-wrap: anywhere;\n  max-width: 340px;\n}\n.search-demo-empty .tidal-button {\n  font-size: 11px;\n}\n.search-demo-detail {\n  position: relative;\n  margin: 7px 14px;\n  padding: 21px 20px;\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  background: var(--t-surface);\n  animation: search-detail-in 420ms var(--t-ease-out) both;\n}\n.search-demo-detail > h4 {\n  font-size: 19px;\n  font-weight: 500;\n  letter-spacing: -0.5px;\n  margin: 13px 40px 8px 0;\n  line-height: 1.3;\n}\n.search-demo-detail > p {\n  font-size: 11px;\n  line-height: 1.8;\n  color: var(--t-muted);\n  margin: 0;\n}\n.search-demo-detail > button {\n  position: absolute;\n  top: 7px;\n  right: 7px;\n  width: 44px;\n  height: 44px;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: var(--t-muted);\n  display: grid;\n  place-items: center;\n}\n.search-demo-detail > button:hover {\n  background: var(--t-wash);\n}\n.search-demo-note {\n  font-size: 11px;\n  color: var(--t-muted);\n  line-height: 1.7;\n  margin: 16px 0 0;\n}\n@keyframes search-result-in {\n  from {\n    opacity: 0;\n    transform: translateY(6px);\n  }\n  to {\n    opacity: 1;\n    transform: none;\n  }\n}\n@keyframes search-detail-in {\n  from {\n    opacity: 0;\n    transform: translateY(-5px);\n  }\n  to {\n    opacity: 1;\n    transform: none;\n  }\n}\n@media (max-width: 480px) {\n  .search-field-specimen {\n    padding: 20px;\n  }\n  .search-demo-top {\n    padding: 14px 15px;\n  }\n  .search-demo-input {\n    padding: 19px 15px 12px;\n  }\n  .search-demo-suggestions {\n    padding: 0 15px 14px;\n  }\n  .search-demo-results-top {\n    padding: 13px 15px 4px;\n    flex-wrap: wrap;\n    gap: 6px;\n  }\n  .search-demo-kind {\n    display: none;\n  }\n  .search-demo-results {\n    padding: 7px 10px;\n  }\n  .search-demo-results button {\n    padding: 10px;\n    gap: 10px;\n  }\n  .search-demo-results strong {\n    font-size: 11px;\n  }\n  .search-demo-results small {\n    font-size: 11px;\n  }\n  .search-demo-detail {\n    margin: 7px 10px;\n    padding: 19px 15px;\n  }\n}\n@media (prefers-reduced-motion: reduce) {\n  .search-demo-suggestions > button:active,\n  .search-demo-results button:active,\n  .search-demo-results button:hover .search-demo-record-icon,\n  .search-demo-results button[aria-expanded=\"true\"] .search-demo-record-icon {\n    transform: none;\n  }\n}\n\n.search-demo-results[aria-busy=\"true\"] {\n  opacity: 0.55;\n  transition: opacity 180ms;\n}\n.search-demo-results button:disabled {\n  cursor: wait;\n}\n.search-demo-expand:disabled {\n  opacity: 0.55;\n  cursor: wait;\n}";

const records = [
  {
    id: "launch-plan",
    title: "Launch plan",
    kind: "Document",
    detail: "Northstar · Product team",
    body: "The sample launch starts with a clear welcome, a useful overview and one shared visual language.",
  },
  {
    id: "launch-workspace",
    title: "Launch workspace",
    kind: "Project",
    detail: "Northstar · 8 sample tasks",
    body: "This fictional workspace gathers the product brief, release notes and interface studies.",
  },
  {
    id: "launch-notes",
    title: "Launch notes",
    kind: "Document",
    detail: "Northstar · Original sample",
    body: "Review the small screens, check keyboard paths and make the next step obvious.",
  },
  {
    id: "ava",
    title: "Ava Reed",
    kind: "Person",
    detail: "Fictional teammate · Design",
    body: "Ava is a fictional member of the sample design team. No personal or customer records are used.",
  },
  {
    id: "interface",
    title: "Interface studies",
    kind: "Project",
    detail: "Northstar · 6 sample studies",
    body: "Six fictional interface studies explore hierarchy, space and connected transitions.",
  },
  {
    id: "motion",
    title: "Motion notes",
    kind: "Document",
    detail: "Northstar · Design team",
    body: "Use motion to connect stable elements, reveal new context and make progress understandable.",
  },
  {
    id: "billing",
    title: "Billing overview",
    kind: "Document",
    detail: "Northstar · Product team",
    body: "This sample outlines a clear billing interface. It contains no financial account or payment data.",
  },
  {
    id: "noah",
    title: "Noah Kim",
    kind: "Person",
    detail: "Fictional teammate · Engineering",
    body: "Noah is a fictional member of the sample engineering team.",
  },
  {
    id: "elan",
    title: "Élan research",
    kind: "Project",
    detail: "Original sample · Research",
    body: "An original research sample with a name that includes an accented character.",
  },
  {
    id: "tokyo",
    title: "東京 workspace",
    kind: "Project",
    detail: "Original sample · International",
    body: "A fictional workspace for checking international search input.",
  },
  {
    id: "welcome",
    title: "The welcome screen",
    kind: "Document",
    detail: "Northstar · Experience",
    body: "Welcome people with a clear purpose and a small, useful next step.",
  },
  {
    id: "elio",
    title: "Eli Morgan",
    kind: "Person",
    detail: "Fictional teammate · Product",
    body: "Eli is a fictional member of the sample product team.",
  },
];

const normalize = (text: string) => text.normalize("NFC").toLowerCase();

function Highlight({ text, query }: { text: string; query: string }) {
  const phrase = normalize(query.trim());
  const start = phrase ? normalize(text).indexOf(phrase) : -1;
  if (start < 0) return <>{text}</>;
  return (
    <>
      {text.slice(0, start)}
      <mark>{text.slice(start, start + phrase.length)}</mark>
      {text.slice(start + phrase.length)}
    </>
  );
}

export function SearchFieldDemo() {
  const [state, setState] = useState({
    query: "",
    settled: "",
    pending: false,
  });
  const [expanded, setExpanded] = useState(false);
  const [composing, setComposing] = useState(false);
  const detailId = useId();
  const [selected, setSelected] = useState<string | null>(null);
  const [height, setHeight] = useState<number>();
  const input = useRef<HTMLInputElement>(null);
  const content = useRef<HTMLDivElement>(null);
  const detailTitle = useRef<HTMLHeadingElement>(null);
  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
  const phrase = normalize(state.settled.trim());
  const matches = phrase
    ? records.filter((record) =>
        normalize(
          record.title + " " + record.kind + " " + record.detail,
        ).includes(phrase),
      )
    : records;
  const shown = matches.slice(0, expanded ? matches.length : 2);
  const active = records.find((record) => record.id === selected);
  useEffect(() => {
    if (composing || !state.query.trim()) return;
    timer.current = setTimeout(
      () =>
        setState((old) =>
          old.query === state.query
            ? { ...old, settled: state.query, pending: false }
            : old,
        ),
      550,
    );
    return () => clearTimeout(timer.current);
  }, [state.query, composing]);
  useEffect(() => () => clearTimeout(timer.current), []);
  useLayoutEffect(() => {
    const node = content.current;
    if (selected && node && node.scrollHeight > node.clientHeight) {
      node.scrollTop = node.scrollHeight - node.clientHeight;
      detailTitle.current?.focus({ preventScroll: true });
    }
  }, [selected]);
  useLayoutEffect(() => {
    const node = content.current;
    if (!node) return;
    const measure = () => {
      const parent = getComputedStyle(node.parentElement!);
      setHeight(
        node.offsetHeight +
          Number.parseFloat(parent.paddingTop) +
          Number.parseFloat(parent.paddingBottom),
      );
    };
    measure();
    const observer = new ResizeObserver(measure);
    observer.observe(node);
    return () => observer.disconnect();
  }, []);
  function change(query: string) {
    clearTimeout(timer.current);
    setSelected(null);
    setExpanded(false);
    setState((old) => ({
      query,
      settled: query.trim() ? old.settled : "",
      pending: !!query.trim(),
    }));
  }
  function submit(query: string) {
    clearTimeout(timer.current);
    setState({ query, settled: query, pending: false });
    setSelected(null);
    setExpanded(false);
  }
  return (
    <div className="search-field-specimen">
      <div className="search-demo-window">
        <div className="search-demo-top">
          <span>
            <Layers size={14} aria-hidden="true" /> NORTHSTAR / WORKSPACE
          </span>
          <span>12 sample records</span>
        </div>
        <div className="search-demo-input">
          <TidalSearchField
            ref={input}
            label="Search the sample workspace"
            placeholder="Projects, notes or people…"
            value={state.query}
            onValueChange={change}
            onSearch={submit}
            pending={state.pending}
            resultCount={state.query.trim() ? matches.length : undefined}
            description="Search by name or topic."
            autoComplete="off"
            onCompositionStart={() => setComposing(true)}
            onCompositionEnd={() => setComposing(false)}
          />
        </div>
        <div className="search-demo-suggestions" aria-label="Sample queries">
          {["Launch", "Motion", "Élan"].map((query) => (
            <button
              type="button"
              key={query}
              onClick={() => {
                change(query);
                input.current?.focus({ preventScroll: true });
              }}
            >
              <Search size={11} aria-hidden="true" />
              {query}
            </button>
          ))}
        </div>
        <div className="search-demo-results-top">
          <span>{phrase ? "SEARCH MATCHES" : "RECENT RECORDS"}</span>
          <span role="status">
            {state.pending
              ? "Looking through the sample…"
              : `${matches.length} ${phrase ? (matches.length === 1 ? "match" : "matches") : "records"} · Showing ${shown.length}`}
          </span>
        </div>
        <div className="search-demo-stage" style={{ height }}>
          <div ref={content} className="search-demo-content">
            <ul
              className="search-demo-results"
              aria-label="Sample workspace records"
              aria-busy={state.pending}
            >
              {shown.map((record, index) => {
                const Icon =
                  record.kind === "Document"
                    ? FileText
                    : record.kind === "Project"
                      ? Folder
                      : UserRound;
                return (
                  <li
                    key={record.id}
                    style={
                      { "--search-delay": `${index * 55}ms` } as CSSProperties
                    }
                  >
                    <button
                      type="button"
                      disabled={state.pending}
                      onClick={() =>
                        setSelected((old) =>
                          old === record.id ? null : record.id,
                        )
                      }
                      aria-expanded={selected === record.id}
                      aria-controls={
                        selected === record.id ? detailId : undefined
                      }
                    >
                      <span
                        className="search-demo-record-icon"
                        aria-hidden="true"
                      >
                        <Icon size={18} />
                      </span>
                      <span>
                        <strong>
                          <Highlight
                            text={record.title}
                            query={state.settled}
                          />
                        </strong>
                        <small>{record.detail}</small>
                      </span>
                      <span className="search-demo-kind">{record.kind}</span>
                      <ArrowUpRight size={14} aria-hidden="true" />
                    </button>
                  </li>
                );
              })}
            </ul>
            {!matches.length && (
              <div className="search-demo-empty">
                <Search size={21} aria-hidden="true" />
                <strong>No results</strong>
                <p>
                  No sample records match “{state.settled}”. Try another search.
                </p>
                <TidalButton
                  variant="secondary"
                  onClick={() => {
                    change("");
                    input.current?.focus({ preventScroll: true });
                  }}
                >
                  Clear and explore
                </TidalButton>
              </div>
            )}
            {active && (
              <article
                className="search-demo-detail"
                key={active.id}
                id={detailId}
                aria-labelledby={detailId + "-title"}
              >
                <span className="demo-eyebrow">ORIGINAL FICTIONAL RECORD</span>
                <h4 ref={detailTitle} tabIndex={-1} id={detailId + "-title"}>
                  {active.title}
                </h4>
                <p>{active.body}</p>
                <button
                  type="button"
                  aria-label="Close sample detail"
                  onClick={() => {
                    setSelected(null);
                    if (content.current) content.current.scrollTop = 0;
                    input.current?.focus({ preventScroll: true });
                  }}
                >
                  <X size={15} aria-hidden="true" />
                </button>
              </article>
            )}
          </div>
        </div>
        {matches.length > 2 && (
          <button
            className="search-demo-expand"
            type="button"
            disabled={state.pending}
            aria-expanded={expanded}
            onClick={() => setExpanded(!expanded)}
          >
            {expanded
              ? "Show fewer records"
              : `Show all ${matches.length} ${phrase ? "matches" : "sample records"}`}
            <ArrowUpRight size={12} aria-hidden="true" />
          </button>
        )}
      </div>
      <p className="search-demo-note">
        Search and open original sample records. This preview runs in your
        browser.
      </p>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <SearchFieldDemo />
    </div>
  );
}

```

## Gotchas

- Keep field state, validation results, submission, and persistence in the host form workflow.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation.","Escape dismisses the open overlay where the underlying primitive supports dismissal."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Required visible label, controlled value:string and onValueChange(string). Optional onSearch(string) handles unmodified Enter; without it native form submission remains available. Native type=search input props/ref, name, required, disabled, readOnly, id, className(input) and rootClassName supported; no wrapper form is rendered. Clear button and Escape clear editable values and retain input focus; disabled/readOnly omit clear. Keyboard handlers compose with caller onKeyDown and honor preventDefault. Composition ref, isComposing and keyCode229 protect IME Enter/Escape. Optional description, pending, resultCount(finite values floor/clamp nonnegative; omitted/nonfinite hides count), error, announce(defaultfalse). Help/status IDs compose with aria-describedby; error sets aria-invalid and role=alert, pending sets aria-busy and limits decorative looping to pending. Other status announcements opt in. Native clear decoration is suppressed in WebKit so one clear control remains; reserved slot prevents query-width shifts. Reduced motion stops sweeps/transitions. Consumers own matching, debounce, requests, composition-aware work scheduling, results and focus after selection.
